diff --git a/Assets/Scripts/GameManager.asset b/Assets/Scripts/GameManager.asset index 3ff7e20..1cd6e55 100644 --- a/Assets/Scripts/GameManager.asset +++ b/Assets/Scripts/GameManager.asset @@ -109,16 +109,382 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: mazes + Data: currentlyInTimeSequence - Name: $v Entry: 7 Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: mazes + Data: currentlyInTimeSequence - Name: k__BackingField Entry: 7 Data: 7|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: System.Boolean, mscorlib + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 7 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: waitingForTimeSequenceFinalize + - Name: $v + Entry: 7 + Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: waitingForTimeSequenceFinalize + - Name: k__BackingField + Entry: 9 + Data: 7 + - Name: k__BackingField + Entry: 9 + Data: 7 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: jumpingToTimeSequence + - Name: $v + Entry: 7 + Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: jumpingToTimeSequence + - Name: k__BackingField + Entry: 9 + Data: 7 + - Name: k__BackingField + Entry: 9 + Data: 7 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: currentTimeSequence + - Name: $v + Entry: 7 + Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: currentTimeSequence + - Name: k__BackingField + Entry: 7 + Data: 14|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: Marro.PacManUdon.PacManTimeSequence, Assembly-CSharp + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 7 + Data: 15|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: System.Int32, mscorlib + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 16|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: timeSequenceSecondsPassed + - Name: $v + Entry: 7 + Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: timeSequenceSecondsPassed + - Name: k__BackingField + Entry: 7 + Data: 18|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: System.Single, mscorlib + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 18 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 19|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: timeSequenceProgress + - Name: $v + Entry: 7 + Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: timeSequenceProgress + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 21|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: timeSequenceKeyframeTimes + - Name: $v + Entry: 7 + Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: timeSequenceKeyframeTimes + - Name: k__BackingField + Entry: 7 + Data: 23|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: System.Single[], mscorlib + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 23 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: mazes + - Name: $v + Entry: 7 + Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: mazes + - Name: k__BackingField + Entry: 7 + Data: 26|System.RuntimeType, mscorlib - Name: Entry: 1 Data: Marro.PacManUdon.Maze[], Assembly-CSharp @@ -127,7 +493,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 7 - Data: 8|System.RuntimeType, mscorlib + Data: 27|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.Component[], UnityEngine.CoreModule @@ -148,13 +514,13 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 10|UnityEngine.HeaderAttribute, UnityEngine.CoreModule + Data: 29|UnityEngine.HeaderAttribute, UnityEngine.CoreModule - Name: header Entry: 1 Data: Static game components @@ -163,7 +529,7 @@ MonoBehaviour: Data: - Name: Entry: 7 - Data: 11|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 30|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: @@ -187,13 +553,13 @@ MonoBehaviour: Data: pacMan - Name: $v Entry: 7 - Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: pacMan - Name: k__BackingField Entry: 7 - Data: 13|System.RuntimeType, mscorlib + Data: 32|System.RuntimeType, mscorlib - Name: Entry: 1 Data: Marro.PacManUdon.PacMan, Assembly-CSharp @@ -215,300 +581,6 @@ MonoBehaviour: - Name: k__BackingField Entry: 5 Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 15|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: ghostManager - - Name: $v - Entry: 7 - Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: ghostManager - - Name: k__BackingField - Entry: 7 - Data: 17|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: Marro.PacManUdon.GhostManager, Assembly-CSharp - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 4 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 18|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 19|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: bonusFruit - - Name: $v - Entry: 7 - Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: bonusFruit - - Name: k__BackingField - Entry: 7 - Data: 21|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: Marro.PacManUdon.BonusFruit, Assembly-CSharp - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 4 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 23|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: pelletManager - - Name: $v - Entry: 7 - Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: pelletManager - - Name: k__BackingField - Entry: 7 - Data: 25|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: Marro.PacManUdon.PelletManager, Assembly-CSharp - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 4 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 27|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: statusDisplay - - Name: $v - Entry: 7 - Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: statusDisplay - - Name: k__BackingField - Entry: 7 - Data: 29|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: Marro.PacManUdon.StatusDisplay, Assembly-CSharp - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 4 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 31|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: attractScreen - - Name: $v - Entry: 7 - Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: attractScreen - - Name: k__BackingField - Entry: 9 - Data: 25 - - Name: k__BackingField - Entry: 9 - Data: 4 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - Name: _fieldAttributes Entry: 7 Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib @@ -538,25 +610,25 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: intermissionScreen + Data: ghostManager - Name: $v Entry: 7 Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: intermissionScreen + Data: ghostManager - Name: k__BackingField Entry: 7 Data: 36|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: UnityEngine.GameObject, UnityEngine.CoreModule + Data: Marro.PacManUdon.GhostManager, Assembly-CSharp - Name: Entry: 8 Data: - Name: k__BackingField Entry: 9 - Data: 36 + Data: 4 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -598,73 +670,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: pressStartButtonScreen + Data: bonusFruit - Name: $v Entry: 7 Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: pressStartButtonScreen - - Name: k__BackingField - Entry: 9 - Data: 36 - - Name: k__BackingField - Entry: 9 - Data: 36 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 41|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: playerInput - - Name: $v - Entry: 7 - Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: playerInput + Data: bonusFruit - Name: k__BackingField Entry: 7 - Data: 43|System.RuntimeType, mscorlib + Data: 40|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: Marro.PacManUdon.PlayerInput, Assembly-CSharp + Data: Marro.PacManUdon.BonusFruit, Assembly-CSharp - Name: Entry: 8 Data: @@ -685,13 +703,13 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 1 - Name: Entry: 7 - Data: 45|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 42|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: @@ -712,25 +730,25 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: demo + Data: pelletManager - Name: $v Entry: 7 - Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: demo + Data: pelletManager - Name: k__BackingField Entry: 7 - Data: 47|System.RuntimeType, mscorlib + Data: 44|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: UnityEngine.Animator, UnityEngine.AnimationModule + Data: Marro.PacManUdon.PelletManager, Assembly-CSharp - Name: Entry: 8 Data: - Name: k__BackingField Entry: 9 - Data: 47 + Data: 4 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -745,13 +763,13 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 45|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 1 - Name: Entry: 7 - Data: 49|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 46|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: @@ -772,19 +790,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: soundManager + Data: statusDisplay - Name: $v Entry: 7 - Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: soundManager + Data: statusDisplay - Name: k__BackingField Entry: 7 - Data: 51|System.RuntimeType, mscorlib + Data: 48|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: SoundManager, Assembly-CSharp + Data: Marro.PacManUdon.StatusDisplay, Assembly-CSharp - Name: Entry: 8 Data: @@ -803,6 +821,60 @@ MonoBehaviour: - Name: k__BackingField Entry: 5 Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 49|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 50|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: attractScreen + - Name: $v + Entry: 7 + Data: 51|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: attractScreen + - Name: k__BackingField + Entry: 9 + Data: 44 + - Name: k__BackingField + Entry: 9 + Data: 4 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true - Name: _fieldAttributes Entry: 7 Data: 52|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib @@ -832,16 +904,136 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: networkManagerSetup + Data: intermissionScreen - Name: $v Entry: 7 Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: networkManagerSetup + Data: intermissionScreen + - Name: k__BackingField + Entry: 7 + Data: 55|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: UnityEngine.GameObject, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 55 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 56|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 57|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: pressStartButtonScreen + - Name: $v + Entry: 7 + Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: pressStartButtonScreen - Name: k__BackingField Entry: 9 - Data: 3 + Data: 55 + - Name: k__BackingField + Entry: 9 + Data: 55 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 59|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 60|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: playerInput + - Name: $v + Entry: 7 + Data: 61|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: playerInput + - Name: k__BackingField + Entry: 7 + Data: 62|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: Marro.PacManUdon.PlayerInput, Assembly-CSharp + - Name: + Entry: 8 + Data: - Name: k__BackingField Entry: 9 Data: 4 @@ -859,133 +1051,10 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 55|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 63|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 1 - - Name: - Entry: 7 - Data: 56|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: recorder - - Name: $v - Entry: 7 - Data: 57|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: recorder - - Name: k__BackingField - Entry: 9 - Data: 36 - - Name: k__BackingField - Entry: 9 - Data: 36 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 58|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 59|UnityEngine.SerializeField, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: startingExtraLives - - Name: $v - Entry: 7 - Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: startingExtraLives - - Name: k__BackingField - Entry: 7 - Data: 61|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Int32, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 62|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 2 - - Name: - Entry: 7 - Data: 63|UnityEngine.HeaderAttribute, UnityEngine.CoreModule - - Name: header - Entry: 1 - Data: Game settings - - Name: - Entry: 8 - Data: - Name: Entry: 7 Data: 64|UnityEngine.SerializeField, UnityEngine.CoreModule @@ -1009,19 +1078,25 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: scoreToExtraLife + Data: demo - Name: $v Entry: 7 Data: 65|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: scoreToExtraLife + Data: demo - Name: k__BackingField - Entry: 9 - Data: 61 + Entry: 7 + Data: 66|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: UnityEngine.Animator, UnityEngine.AnimationModule + - Name: + Entry: 8 + Data: - Name: k__BackingField Entry: 9 - Data: 61 + Data: 66 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1036,13 +1111,298 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 66|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 67|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 1 - Name: Entry: 7 - Data: 67|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 68|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: soundManager + - Name: $v + Entry: 7 + Data: 69|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: soundManager + - Name: k__BackingField + Entry: 7 + Data: 70|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: SoundManager, Assembly-CSharp + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 4 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 71|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 72|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: networkManagerSetup + - Name: $v + Entry: 7 + Data: 73|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: networkManagerSetup + - Name: k__BackingField + Entry: 9 + Data: 3 + - Name: k__BackingField + Entry: 9 + Data: 4 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 74|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 75|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: recorder + - Name: $v + Entry: 7 + Data: 76|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: recorder + - Name: k__BackingField + Entry: 9 + Data: 55 + - Name: k__BackingField + Entry: 9 + Data: 55 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 77|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 78|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: startingExtraLives + - Name: $v + Entry: 7 + Data: 79|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: startingExtraLives + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 80|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 7 + Data: 81|UnityEngine.HeaderAttribute, UnityEngine.CoreModule + - Name: header + Entry: 1 + Data: Game settings + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: 82|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: scoreToExtraLife + - Name: $v + Entry: 7 + Data: 83|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: scoreToExtraLife + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 84|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 7 + Data: 85|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: @@ -1066,13 +1426,13 @@ MonoBehaviour: Data: maze - Name: $v Entry: 7 - Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 86|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: maze - Name: k__BackingField Entry: 7 - Data: 69|System.RuntimeType, mscorlib + Data: 87|System.RuntimeType, mscorlib - Name: Entry: 1 Data: Marro.PacManUdon.Maze, Assembly-CSharp @@ -1096,7 +1456,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 70|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 88|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1120,13 +1480,13 @@ MonoBehaviour: Data: intermission2Pole - Name: $v Entry: 7 - Data: 71|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 89|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: intermission2Pole - Name: k__BackingField Entry: 7 - Data: 72|System.RuntimeType, mscorlib + Data: 90|System.RuntimeType, mscorlib - Name: Entry: 1 Data: Marro.PacManUdon.Intermission2Pole, Assembly-CSharp @@ -1148,402 +1508,6 @@ MonoBehaviour: - Name: k__BackingField Entry: 5 Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 73|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: mazeSpriteAnimator - - Name: $v - Entry: 7 - Data: 74|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: mazeSpriteAnimator - - Name: k__BackingField - Entry: 9 - Data: 47 - - Name: k__BackingField - Entry: 9 - Data: 47 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 75|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: attractScreenElements - - Name: $v - Entry: 7 - Data: 76|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: attractScreenElements - - Name: k__BackingField - Entry: 7 - Data: 77|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: UnityEngine.GameObject[], UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 77 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 78|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: intermissionScreenElements - - Name: $v - Entry: 7 - Data: 79|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: intermissionScreenElements - - Name: k__BackingField - Entry: 9 - Data: 77 - - Name: k__BackingField - Entry: 9 - Data: 77 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 80|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: gameState - - Name: $v - Entry: 7 - Data: 81|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: gameState - - Name: k__BackingField - Entry: 7 - Data: 82|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: Marro.PacManUdon.PacManGameState, Assembly-CSharp - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 83|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: score - - Name: $v - Entry: 7 - Data: 84|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: score - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 85|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: level - - Name: $v - Entry: 7 - Data: 86|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: level - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 87|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: highScore - - Name: $v - Entry: 7 - Data: 88|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: highScore - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 89|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: extraLives - - Name: $v - Entry: 7 - Data: 90|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: extraLives - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 9 - Data: 61 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - Name: _fieldAttributes Entry: 7 Data: 91|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib @@ -1567,25 +1531,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: currentlyInTimeSequence + Data: mazeSpriteAnimator - Name: $v Entry: 7 Data: 92|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: currentlyInTimeSequence + Data: mazeSpriteAnimator - Name: k__BackingField - Entry: 7 - Data: 93|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: + Entry: 9 + Data: 66 - Name: k__BackingField Entry: 9 - Data: 93 + Data: 66 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1600,7 +1558,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 94|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 93|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1621,19 +1579,25 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: waitingForTimeSequenceFinalize + Data: attractScreenElements - Name: $v Entry: 7 - Data: 95|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 94|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: waitingForTimeSequenceFinalize + Data: attractScreenElements - Name: k__BackingField - Entry: 9 - Data: 93 + Entry: 7 + Data: 95|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: UnityEngine.GameObject[], UnityEngine.CoreModule + - Name: + Entry: 8 + Data: - Name: k__BackingField Entry: 9 - Data: 93 + Data: 95 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1669,19 +1633,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: jumpingToTimeSequence + Data: intermissionScreenElements - Name: $v Entry: 7 Data: 97|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: jumpingToTimeSequence + Data: intermissionScreenElements - Name: k__BackingField Entry: 9 - Data: 93 + Data: 95 - Name: k__BackingField Entry: 9 - Data: 93 + Data: 95 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1717,25 +1681,25 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: currentTimeSequence + Data: gameState - Name: $v Entry: 7 Data: 99|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: currentTimeSequence + Data: gameState - Name: k__BackingField Entry: 7 Data: 100|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: Marro.PacManUdon.PacManTimeSequence, Assembly-CSharp + Data: Marro.PacManUdon.PacManGameState, Assembly-CSharp - Name: Entry: 8 Data: - Name: k__BackingField Entry: 9 - Data: 61 + Data: 15 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1772,25 +1736,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: timeSequenceSecondsPassed + Data: score - Name: $v Entry: 7 Data: 102|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: timeSequenceSecondsPassed + Data: score - Name: k__BackingField - Entry: 7 - Data: 103|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Single, mscorlib - - Name: - Entry: 8 - Data: + Entry: 9 + Data: 15 - Name: k__BackingField Entry: 9 - Data: 103 + Data: 15 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1805,7 +1763,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 104|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], + Data: 103|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 @@ -1827,19 +1785,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: timeSequenceProgress + Data: level - Name: $v Entry: 7 - Data: 105|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 104|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: timeSequenceProgress + Data: level - Name: k__BackingField Entry: 9 - Data: 61 + Data: 15 - Name: k__BackingField Entry: 9 - Data: 61 + Data: 15 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1854,7 +1812,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 106|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], + Data: 105|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 @@ -1876,25 +1834,68 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: timeSequenceKeyframeTimes + Data: highScore - Name: $v Entry: 7 - Data: 107|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 106|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: timeSequenceKeyframeTimes + Data: highScore - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField + Entry: 9 + Data: 15 + - Name: k__BackingField Entry: 7 - Data: 108|System.RuntimeType, mscorlib + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - Name: - Entry: 1 - Data: System.Single[], mscorlib + Entry: 6 + Data: - Name: Entry: 8 Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 107|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], + mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: extraLives + - Name: $v + Entry: 7 + Data: 108|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: extraLives + - Name: k__BackingField + Entry: 9 + Data: 15 - Name: k__BackingField Entry: 9 - Data: 108 + Data: 15 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib diff --git a/Assets/Scripts/Ghost.asset b/Assets/Scripts/Ghost.asset index 2f5c6c2..bc14713 100644 --- a/Assets/Scripts/Ghost.asset +++ b/Assets/Scripts/Ghost.asset @@ -43,7 +43,7 @@ MonoBehaviour: Data: - Name: Entry: 12 - Data: 40 + Data: 41 - Name: Entry: 7 Data: @@ -2118,6 +2118,55 @@ MonoBehaviour: - Name: Entry: 8 Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: horizontalDirections + - Name: $v + Entry: 7 + Data: 107|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: horizontalDirections + - Name: k__BackingField + Entry: 9 + Data: 98 + - Name: k__BackingField + Entry: 9 + Data: 99 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: false + - Name: _fieldAttributes + Entry: 7 + Data: 108|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], + mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: - Name: Entry: 13 Data: diff --git a/Assets/Scripts/Ghost.cs b/Assets/Scripts/Ghost.cs index acdaeec..0e7efd2 100644 --- a/Assets/Scripts/Ghost.cs +++ b/Assets/Scripts/Ghost.cs @@ -173,7 +173,6 @@ namespace Marro.PacManUdon && CrossesTileCenter(position, nextPosition, direction)) { var newDirection = GetInverseDirection(direction); - Debug.Log($"{gameObject} turned around from direction {direction} to {newDirection}"); SetDirection(newDirection); turnAroundSoon = false; return nextPosition; @@ -186,54 +185,16 @@ namespace Marro.PacManUdon if (offGrid || ghostState == PacManGhostState.Returning) { - bool XAxisAlligned = CheckAndAllignToTargetX(position, nextPosition, target); - bool YAxisAlligned = CheckAndAllignToTargetY(position, nextPosition, target); - if (offGrid) - { - if (XAxisAlligned) - { - nextPosition.x = target.x; - } - if (YAxisAlligned) - { - nextPosition.y = target.y; - } - } - if (XAxisAlligned && YAxisAlligned) - { - if (!offGrid) - { - nextPosition = target; - } - OffGridTargetReached(); - // Debug.Log($"{gameObject} reached offGridTarget {target} at position {position}, new state {state}, offGrid is now {offGrid}, new direction: {direction}"); - } - if ((XAxisAlligned || YAxisAlligned) && offGrid) - { - SetDirection(GetOffGridDirectionToTarget(nextPosition, target, direction)); - // Debug.Log($"{gameObject} Alligned X Axis: {XAxisAlligned}, Y Axis: {YAxisAlligned} with position: {position}, new nextPosition: {nextPosition}, new target: {target}, now moving in direction {direction}"); - // nextPosition = GridMover.GetNextPosition(position, direction, speed); - } + PerformOffgridRelatedMovement(position, ref nextPosition); } + if (!offGrid && followingPredefinedPath) { nextPosition = ProcessPredefinedPath(position, nextPosition); } else if (!offGrid && CrossesTileCenter(position, nextPosition, direction)) { - var gridPosition = PositionToGrid(position); - var blockedDirections = pelletManager.GetBlockedDirections(position); - blockedDirections[GetIllegalCardinalDirection(direction)] = true; // Not allowed to turn around - - target = GetGridTarget(gridPosition); - var newDirection = GetGridDirectionToTargetGreedy(blockedDirections, gridPosition, target); - if (newDirection != direction) - { - Debug.Log($"{gameObject.name} Was moving in direction {direction}, continues with moving in direction {newDirection}"); - nextPosition = GetNextPosition(gridPosition, directionVectors[(int)newDirection], speed, networkManager.SyncedDeltaTime); - SetDirection(newDirection); - } - // Debug.Log($"{gameObject} crossed tile center {gridPosition}, new target: {target}, new direction: {direction}"); + TryToTurn(position, ref nextPosition); } var distance = Vector2.Distance(position, nextPosition); @@ -245,20 +206,78 @@ namespace Marro.PacManUdon return nextPosition; } - private int GetIllegalCardinalDirection(Direction direction) + private Vector2 PerformOffgridRelatedMovement(Vector2 position, ref Vector2 nextPosition) + { + bool XAxisAlligned = CheckAndAllignToTargetX(position, nextPosition, target); + bool YAxisAlligned = CheckAndAllignToTargetY(position, nextPosition, target); + if (offGrid) + { + if (XAxisAlligned) + { + nextPosition.x = target.x; + } + if (YAxisAlligned) + { + nextPosition.y = target.y; + } + } + if (XAxisAlligned && YAxisAlligned) + { + if (!offGrid) + { + nextPosition = target; + } + OffGridTargetReached(); + // Debug.Log($"{gameObject} reached offGridTarget {target} at position {position}, new state {state}, offGrid is now {offGrid}, new direction: {direction}"); + } + if ((XAxisAlligned || YAxisAlligned) && offGrid) + { + SetDirection(GetOffGridDirectionToTarget(nextPosition, target, direction)); + // Debug.Log($"{gameObject} Alligned X Axis: {XAxisAlligned}, Y Axis: {YAxisAlligned} with position: {position}, new nextPosition: {nextPosition}, new target: {target}, now moving in direction {direction}"); + // nextPosition = GridMover.GetNextPosition(position, direction, speed); + } + + return nextPosition; + } + + private void TryToTurn(Vector2 position, ref Vector2 nextPosition) + { + var gridPosition = PositionToGrid(position); + var availableDirections = pelletManager.GetAvailableDirections(position); + + if (availableDirections == 0) + { + return; + } + + availableDirections &= GetIllegalCardinalDirectionMask(direction); // Not allowed to turn around + + target = GetGridTarget(gridPosition); + var newDirection = GetGridDirectionToTargetGreedy(availableDirections, gridPosition, target); + if (newDirection == direction) + { + return; + } + + Debug.Log($"{gameObject.name} Turned from direction {direction} to direction {newDirection}"); + nextPosition = GetNextPosition(gridPosition, directionVectors[(int)newDirection], speed, networkManager.SyncedDeltaTime); + SetDirection(newDirection); + } + + private int GetIllegalCardinalDirectionMask(Direction direction) { switch (direction) { case Direction.Up: - return 1; + return 0b1101; case Direction.Down: - return 0; + return 0b1110; case Direction.Left: - return 3; + return 0b0111; case Direction.Right: - return 2; - default: - return 0; + return 0b1011; + default: + return 0b1111; } } @@ -431,20 +450,20 @@ namespace Marro.PacManUdon return rngState; } - private Direction[] cardinalDirections = new Direction[] { Direction.Up, Direction.Down, Direction.Left, Direction.Right }; - Direction GetGridDirectionToTargetGreedy(bool[] blockedDirections, Vector2 gridPosition, Vector2 targetGridPosition) + private readonly Direction[] cardinalDirections = new Direction[] { Direction.Up, Direction.Left, Direction.Down, Direction.Right }; + private readonly Direction[] horizontalDirections = new Direction[] { Direction.Left, Direction.Right }; + Direction GetGridDirectionToTargetGreedy(int availableDirections, Vector2 gridPosition, Vector2 targetGridPosition) { Direction bestDirection = Direction.Zero; float bestDistance = float.MaxValue; - for (int i = horizontalOnly ? 2 : 0; i < blockedDirections.Length; i++) + foreach (var direction in horizontalOnly ? horizontalDirections : cardinalDirections) { - if (blockedDirections[i]) + if (((int)direction & availableDirections) == 0) { continue; } // Debug.Log("Evaluating direction " + direction); - var direction = cardinalDirections[i]; float distance = Vector2.Distance(gridPosition + directionVectors[(int)direction], targetGridPosition); if (distance < bestDistance) { diff --git a/Assets/Scripts/PacManConstants.cs b/Assets/Scripts/PacManConstants.cs index 2be9cf1..67cfa77 100644 --- a/Assets/Scripts/PacManConstants.cs +++ b/Assets/Scripts/PacManConstants.cs @@ -59,41 +59,77 @@ namespace Marro.PacManUdon public static class PacManConstants { // Jagged or 2D arrays can't be static so we work with 1D arrays - public static int[] GetMazeDefinition() => new int[] { + public static int[] GetMazeCollisionInfo() => new int[] + { -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, - -02, 216, 215, 214, 213, 212, 196, 195, 194, 193, 192, 191, 190, -02, -02, 178, 179, 180, 181, 182, 183, 152, 151, 150, 149, 148, 147, -02, - -02, 217, -02, -02, -02, -02, 197, -02, -02, -02, -02, -02, 189, -02, -02, 177, -02, -02, -02, -02, -02, 153, -02, -02, -02, -02, 146, -02, - -02, 003, -02, -01, -01, -02, 198, -02, -01, -01, -01, -02, 188, -02, -02, 176, -02, -01, -01, -01, -02, 154, -02, -01, -01, -02, 002, -02, - -02, 218, -02, -02, -02, -02, 199, -02, -02, -02, -02, -02, 187, -02, -02, 175, -02, -02, -02, -02, -02, 155, -02, -02, -02, -02, 145, -02, - -02, 219, 220, 221, 222, 223, 200, 201, 202, 203, 204, 205, 186, 185, 184, 174, 173, 172, 165, 164, 163, 156, 157, 158, 159, 160, 144, -02, - -02, 224, -02, -02, -02, -02, 231, -02, -02, 206, -02, -02, -02, -02, -02, -02, -02, -02, 166, -02, -02, 161, -02, -02, -02, -02, 143, -02, - -02, 225, -02, -02, -02, -02, 232, -02, -02, 207, -02, -02, -02, -02, -02, -02, -02, -02, 167, -02, -02, 162, -02, -02, -02, -02, 142, -02, - -02, 226, 227, 228, 229, 230, 233, -02, -02, 208, 209, 210, 211, -02, -02, 171, 170, 169, 168, -02, -02, 136, 137, 138, 139, 140, 141, -02, - -02, -02, -02, -02, -02, -02, 234, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, 134, -02, -02, -02, -02, -02, -02, - -01, -01, -01, -01, -01, -02, 235, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, 133, -02, -01, -01, -01, -01, -01, - -01, -01, -01, -01, -01, -02, 236, -02, -02, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -02, -02, 132, -02, -01, -01, -01, -01, -01, - -01, -01, -01, -01, -01, -02, 237, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, 131, -02, -01, -01, -01, -01, -01, - -02, -02, -02, -02, -02, -02, 238, -02, -02, -01, -02, -01, -01, -01, -01, -01, -01, -02, -01, -02, -02, 130, -02, -02, -02, -02, -02, -02, - -01, -01, -01, -01, -01, -01, 239, -01, -01, -01, -02, -01, -01, -01, -01, -01, -01, -02, -01, -01, -01, 129, -01, -01, -01, -01, -01, -01, - -02, -02, -02, -02, -02, -02, 240, -02, -02, -01, -02, -01, -01, -01, -01, -01, -01, -02, -01, -02, -02, 128, -02, -02, -02, -02, -02, -02, - -01, -01, -01, -01, -01, -02, 241, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, 127, -02, -01, -01, -01, -01, -01, - -01, -01, -01, -01, -01, -02, 242, -02, -02, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -02, -02, 126, -02, -01, -01, -01, -01, -01, - -01, -01, -01, -01, -01, -02, 243, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, 125, -02, -01, -01, -01, -01, -01, - -02, -02, -02, -02, -02, -02, 244, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, 124, -02, -02, -02, -02, -02, -02, - -02, 086, 087, 088, 089, 090, 091, 094, 095, 096, 097, 098, 099, -02, -02, 104, 105, 106, 107, 108, 109, 110, 123, 122, 121, 120, 119, -02, - -02, 085, -02, -02, -02, -02, 092, -02, -02, -02, -02, -02, 100, -02, -02, 103, -02, -02, -02, -02, -02, 111, -02, -02, -02, -02, 118, -02, - -02, 084, -02, -02, -02, -02, 093, -02, -02, -02, -02, -02, 101, -02, -02, 102, -02, -02, -02, -02, -02, 112, -02, -02, -02, -02, 117, -02, - -02, 000, 083, 082, -02, -02, 010, 009, 008, 007, 006, 005, 004, -01, -01, 063, 062, 061, 060, 059, 058, 057, -02, -02, 115, 116, 001, -02, - -02, -02, -02, 081, -02, -02, 011, -02, -02, 079, -02, -02, -02, -02, -02, -02, -02, -02, 064, -02, -02, 056, -02, -02, 114, -02, -02, -02, - -02, -02, -02, 080, -02, -02, 012, -02, -02, 078, -02, -02, -02, -02, -02, -02, -02, -02, 065, -02, -02, 055, -02, -02, 113, -02, -02, -02, - -02, 018, 017, 016, 015, 014, 013, -02, -02, 077, 076, 075, 074, -02, -02, 069, 068, 067, 066, -02, -02, 054, 053, 052, 051, 050, 049, -02, - -02, 019, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, 073, -02, -02, 070, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, 048, -02, - -02, 020, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, 072, -02, -02, 071, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, 047, -02, - -02, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, 032, 033, 034, 035, 036, 037, 038, 039, 040, 041, 042, 043, 044, 045, 046, -02, + -02, 009, -01, -01, -01, -01, 013, -01, -01, -01, -01, -01, 005, -02, -02, 009, -01, -01, -01, -01, -01, 013, -01, -01, -01, -01, 005, -02, + -02, -01, -02, -02, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -02, -02, -01, -02, + -02, -01, -02, -01, -01, -02, -01, -02, -01, -01, -01, -02, -01, -02, -02, -01, -02, -01, -01, -01, -02, -01, -02, -01, -01, -02, -01, -02, + -02, -01, -02, -02, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -02, -02, -01, -02, + -02, 011, -01, -01, -01, -01, 015, -01, -01, 013, -01, -01, 014, -01, -01, 014, -01, -01, 013, -01, -01, 015, -01, -01, -01, -01, 007, -02, + -02, -01, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -01, -02, + -02, -01, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -01, -02, + -02, 010, -01, -01, -01, -01, 007, -02, -02, 010, -01, -01, 005, -02, -02, 009, -01, -01, 006, -02, -02, 011, -01, -01, -01, -01, 006, -02, + -02, -02, -02, -02, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -02, -02, -02, -02, + 013, 013, 013, 013, 005, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, 009, 013, 013, 013, 013, + 015, 015, 015, 015, 007, -02, -01, -02, -02, 009, -01, -01, 014, -01, -01, 014, -01, -01, 005, -02, -02, -01, -02, 011, 015, 015, 015, 015, + 014, 014, 014, 014, 006, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, 010, 014, 014, 014, 014, + -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, 009, 013, 013, 013, 013, 005, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, + -01, -01, -01, -01, -01, -01, 015, -01, -01, 007, -02, 011, 015, 015, 015, 015, 007, -02, 011, -01, -01, 015, -01, -01, -01, -01, -01, -01, + -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, 010, 014, 014, 014, 014, 006, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, + 013, 013, 013, 013, 005, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, 009, 013, 013, 013, 013, + 015, 015, 015, 015, 007, -02, -01, -02, -02, 011, -01, -01, -01, -01, -01, -01, -01, -01, 007, -02, -02, -01, -02, 011, 015, 015, 015, 015, + 014, 014, 014, 014, 006, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, 010, 014, 014, 014, 014, + -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, + -02, 009, -01, -01, -01, -01, 015, -01, -01, 014, -01, -01, 005, -02, -02, 009, -01, -01, 014, -01, -01, 015, -01, -01, -01, -01, 005, -02, + -02, -01, -02, -02, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -02, -02, -01, -02, + -02, -01, -02, -02, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -01, -02, -02, -02, -02, -01, -02, + -02, 010, -01, 005, -02, -02, 011, -01, -01, 013, -01, -01, 014, -01, -01, 014, -01, -01, 013, -01, -01, 007, -02, -02, 009, -01, 006, -02, + -02, -02, -02, -01, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -01, -02, -02, -02, + -02, -02, -02, -01, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -01, -02, -02, -02, + -02, 009, -01, 014, -01, -01, 006, -02, -02, 010, -01, -01, 005, -02, -02, 009, -01, -01, 006, -02, -02, 010, -01, -01, 014, -01, 005, -02, + -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, + -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, -02, -01, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -01, -02, + -02, 010, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 014, -01, -01, 014, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 006, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, -02, }; - public static int[] GetPelletIndices() => new int[] + public static int[] GetMazePelletMap() => new int[] + { + -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, + -01, 216, 215, 214, 213, 212, 196, 195, 194, 193, 192, 191, 190, -01, -01, 178, 179, 180, 181, 182, 183, 152, 151, 150, 149, 148, 147, -01, + -01, 217, -01, -01, -01, -01, 197, -01, -01, -01, -01, -01, 189, -01, -01, 177, -01, -01, -01, -01, -01, 153, -01, -01, -01, -01, 146, -01, + -01, 003, -01, -01, -01, -01, 198, -01, -01, -01, -01, -01, 188, -01, -01, 176, -01, -01, -01, -01, -01, 154, -01, -01, -01, -01, 002, -01, + -01, 218, -01, -01, -01, -01, 199, -01, -01, -01, -01, -01, 187, -01, -01, 175, -01, -01, -01, -01, -01, 155, -01, -01, -01, -01, 145, -01, + -01, 219, 220, 221, 222, 223, 200, 201, 202, 203, 204, 205, 186, 185, 184, 174, 173, 172, 165, 164, 163, 156, 157, 158, 159, 160, 144, -01, + -01, 224, -01, -01, -01, -01, 231, -01, -01, 206, -01, -01, -01, -01, -01, -01, -01, -01, 166, -01, -01, 161, -01, -01, -01, -01, 143, -01, + -01, 225, -01, -01, -01, -01, 232, -01, -01, 207, -01, -01, -01, -01, -01, -01, -01, -01, 167, -01, -01, 162, -01, -01, -01, -01, 142, -01, + -01, 226, 227, 228, 229, 230, 233, -01, -01, 208, 209, 210, 211, -01, -01, 171, 170, 169, 168, -01, -01, 136, 137, 138, 139, 140, 141, -01, + -01, -01, -01, -01, -01, -01, 234, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 134, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 235, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 133, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 236, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 132, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 237, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 131, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 238, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 130, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 239, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 129, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 240, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 128, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 241, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 127, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 242, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 126, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 243, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 125, -01, -01, -01, -01, -01, -01, + -01, -01, -01, -01, -01, -01, 244, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 124, -01, -01, -01, -01, -01, -01, + -01, 086, 087, 088, 089, 090, 091, 094, 095, 096, 097, 098, 099, -01, -01, 104, 105, 106, 107, 108, 109, 110, 123, 122, 121, 120, 119, -01, + -01, 085, -01, -01, -01, -01, 092, -01, -01, -01, -01, -01, 100, -01, -01, 103, -01, -01, -01, -01, -01, 111, -01, -01, -01, -01, 118, -01, + -01, 084, -01, -01, -01, -01, 093, -01, -01, -01, -01, -01, 101, -01, -01, 102, -01, -01, -01, -01, -01, 112, -01, -01, -01, -01, 117, -01, + -01, 000, 083, 082, -01, -01, 010, 009, 008, 007, 006, 005, 004, -01, -01, 063, 062, 061, 060, 059, 058, 057, -01, -01, 115, 116, 001, -01, + -01, -01, -01, 081, -01, -01, 011, -01, -01, 079, -01, -01, -01, -01, -01, -01, -01, -01, 064, -01, -01, 056, -01, -01, 114, -01, -01, -01, + -01, -01, -01, 080, -01, -01, 012, -01, -01, 078, -01, -01, -01, -01, -01, -01, -01, -01, 065, -01, -01, 055, -01, -01, 113, -01, -01, -01, + -01, 018, 017, 016, 015, 014, 013, -01, -01, 077, 076, 075, 074, -01, -01, 069, 068, 067, 066, -01, -01, 054, 053, 052, 051, 050, 049, -01, + -01, 019, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 073, -01, -01, 070, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 048, -01, + -01, 020, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 072, -01, -01, 071, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, 047, -01, + -01, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, 032, 033, 034, 035, 036, 037, 038, 039, 040, 041, 042, 043, 044, 045, 046, -01, + -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, -01, + }; + + public static int[] GetMazePelletIndices() => new int[] { 645, 670, 110, 085, 656, 655, 654, 653, 652, 651, 650, 678, 706, 734, 733, 732, 731, 730, 729, 757, 785, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, diff --git a/Assets/Scripts/PelletManager.asset b/Assets/Scripts/PelletManager.asset index 90c0920..3984151 100644 --- a/Assets/Scripts/PelletManager.asset +++ b/Assets/Scripts/PelletManager.asset @@ -535,13 +535,13 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: tilemap + Data: collisionMap - Name: $v Entry: 7 Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: tilemap + Data: collisionMap - Name: k__BackingField Entry: 7 Data: 30|System.RuntimeType, mscorlib diff --git a/Assets/Scripts/PelletManager.cs b/Assets/Scripts/PelletManager.cs index 76724c0..dcc5721 100644 --- a/Assets/Scripts/PelletManager.cs +++ b/Assets/Scripts/PelletManager.cs @@ -18,7 +18,7 @@ namespace Marro.PacManUdon byte[] syncedPelletsCollected; - int[] tilemap; + int[] collisionMap; const int mazeWidth = 28; const int mazeHeight = 31; @@ -84,23 +84,22 @@ namespace Marro.PacManUdon public bool IsWallUpcoming(Vector2 position, Vector2 directionVector) { var result = GetTileAt(position + directionVector) == (int)PacManTileType.Wall; - Debug.Log($"Is wall upcoming {result} at position {position}, direction {directionVector}"); return result; } - public bool[] GetBlockedDirections(Vector2 position) + public int GetAvailableDirections(Vector2 position) { - var results = new bool[4]; + var directions = GetTileAt(position); - results[0] = IsWallUpcoming(position, Vector2.down); - results[1] = IsWallUpcoming(position, Vector2.up); - results[2] = IsWallUpcoming(position, Vector2.left); - results[3] = IsWallUpcoming(position, Vector2.right); + if (directions <= 0) + { + return 0; + } - return results; + return directions; } - private int GetTileAt(Vector2 position) => tilemap[GetTilemapIndex(position)]; + private int GetTileAt(Vector2 position) => collisionMap[GetTilemapIndex(position)]; private int GetTilemapIndex(Vector2 position) { @@ -133,7 +132,7 @@ namespace Marro.PacManUdon syncedPelletsCollected = new byte[pellets.Length/8 + 1]; PelletCollectedCount = 0; - tilemap = PacManConstants.GetMazeDefinition(); + collisionMap = PacManConstants.GetMazeCollisionInfo(); return PelletCount; } diff --git a/Assets/Test stuff/MazeDefinitionGenerator.cs b/Assets/Test stuff/MazeDefinitionGenerator.cs index d93f6ac..f245b14 100644 --- a/Assets/Test stuff/MazeDefinitionGenerator.cs +++ b/Assets/Test stuff/MazeDefinitionGenerator.cs @@ -9,17 +9,44 @@ public class MazeDefinitionGenerator : UdonSharpBehaviour { void Start() { - GetMazeMap(); + PrintPelletMap(); + PrintMazeMap(); } - private void GetMazeMap() + private void PrintPelletMap() { - var pellets = GetComponentsInChildren(includeInactive: true); - var width = 28; var height = 31; + + var pellets = GetComponentsInChildren(includeInactive: true); + int[] map = new int[width * height]; int[] pelletLocations = new int[pellets.Length]; + + for (int i = 0; i < map.Length; i++) + { + map[i] = -1; + } + + for (int i = 0; i < pellets.Length; i++) + { + Pellet pellet = pellets[i]; + var position = GridMover.PositionToGrid(new Vector2(pellet.transform.localPosition.x, -pellet.transform.localPosition.y)); + var index = (int)position.x + (int)position.y * width; + map[index] = i; + pelletLocations[i] = index; + } + + PrintMap(map, width); + PrintMap(pelletLocations, 16); + } + + private void PrintMazeMap() + { + var width = 28; + var height = 31; + + int[] map = new int[width * height]; var collisionMap = GetCollisionMap(); for (int i = 0; i < map.Length; i++) @@ -27,22 +54,87 @@ public class MazeDefinitionGenerator : UdonSharpBehaviour if (collisionMap[i]) { map[i] = (int)PacManTileType.Wall; + continue; } - else - { - map[i] = (int)PacManTileType.Empty; - } + + map[i] = GetGhostTurnInformation(collisionMap, i, width, height); } - for (int i = 0; i < pellets.Length; i++) + PrintMap(map, width); + } + + private int GetGhostTurnInformation(bool[] collisionMap, int i, int width, int height) + { + var availableDirections = 0; + var totalAvailableDirections = 0; + if (!collisionMap[GetTilemapIndex(i, Vector2.up, width, height)]) { - Pellet pellet = pellets[i]; - var position = GridMover.PositionToGrid(new Vector2(pellet.transform.localPosition.x, - pellet.transform.localPosition.y)); - var index = (int)position.x + (int)position.y * width; - map[index] = i; - pelletLocations[i] = index; + availableDirections |= 0b0001; + totalAvailableDirections += 1; + } + if (!collisionMap[GetTilemapIndex(i, Vector2.down, width, height)]) + { + availableDirections |= 0b0010; + totalAvailableDirections += 1; + } + if (!collisionMap[GetTilemapIndex(i, Vector2.left, width, height)]) + { + availableDirections |= 0b0100; + totalAvailableDirections += 1; + } + if (!collisionMap[GetTilemapIndex(i, Vector2.right, width, height)]) + { + availableDirections |= 0b1000; + totalAvailableDirections += 1; } + if (totalAvailableDirections < 2) + { + return (int)PacManTileType.Empty; + } + + if (availableDirections == 0b0011 || availableDirections == 0b1100) + { + return (int)PacManTileType.Empty; + } + + return availableDirections; + } + + private int GetTilemapIndex(int index, Vector2 direction, int width, int height) + { + var position = new Vector2(index % width, index / width) + direction; + position = Clamp(position, 0, width - 1, 0, height - 1); + var result = (int)position.x + (int)position.y * width; + return result; + } + + private static Vector2 Clamp(Vector2 vector, float xMin, float xMax, float yMin, float yMax) + { + if (vector.x < xMin) + { + vector.x = xMin; + } + + if (vector.x > xMax) + { + vector.x = xMax; + } + + if (vector.y < yMin) + { + vector.y = yMin; + } + + if (vector.y > yMax) + { + vector.y = yMax; + } + + return vector; + } + private void PrintMap(int[] map, int width) + { var result = ""; for (int i = 0; i < map.Length; i++) { @@ -62,19 +154,6 @@ public class MazeDefinitionGenerator : UdonSharpBehaviour } Debug.Log(result); - - result = ""; - for (int i = 0; i < pelletLocations.Length; i++) - { - result += $"{pelletLocations[i]:000}, "; - - if (i % 16 == 15) - { - result += "\n"; - } - } - - Debug.Log(result); } public static bool[] GetCollisionMap() => new bool[] {