diff --git a/Assets/Scripts/CollisionManager.cs b/Assets/Scripts/CollisionManager.cs index 56250e7..66504eb 100644 --- a/Assets/Scripts/CollisionManager.cs +++ b/Assets/Scripts/CollisionManager.cs @@ -31,6 +31,7 @@ namespace Marro.PacManUdon byte[] collisionMap; byte[] pelletMap; + int[] pelletIndices; const int mazeWidth = 32; const int mazeHeight = 32; @@ -53,8 +54,7 @@ namespace Marro.PacManUdon powerPelletBlinkToggleInterval = PacManConstants.GetPowerPelletBlinkToggleInterval(); collisionMap = PacManConstants.GetMazeCollisionInfo(); - - SubscribeToEvent(NetworkEventType.SyncPellets); + pelletIndices = PacManConstants.GetMazePelletIndices(); Reset(); } @@ -214,10 +214,11 @@ namespace Marro.PacManUdon private void SetPelletsCollectedFromSync() { - for (int i = 0; i < pellets.Length; i++) + for (byte i = 0; i < pellets.Length; i++) { var active = (syncedPelletsCollected[i/8] & (byte)(1 << i%8)) == 0; pellets[i].gameObject.SetActive(active); + pelletMap[pelletIndices[i]] = i; } } #endregion @@ -267,11 +268,6 @@ namespace Marro.PacManUdon public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType != NetworkEventType.SyncPellets) - { - return; - } - data.Append((byte)PelletCollectedCount, ref index); data.Append(syncedPelletsCollected, ref index); @@ -280,11 +276,6 @@ namespace Marro.PacManUdon public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType != NetworkEventType.SyncPellets) - { - return true; - } - PelletCollectedCount = data.ReadByte(ref index); Array.Copy(data, index, syncedPelletsCollected, 0, syncedPelletsCollected.Length); index += syncedPelletsCollected.Length; diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 79e395d..5005181 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -68,7 +68,7 @@ namespace Marro.PacManUdon intermission2Pole.Initialize(this, ghostManager.Ghosts[0]); SubscribeToEvent(NetworkEventType.StartGameButtonPressed); - SubscribeToEvent(NetworkEventType.TimeSequenceSync); + SubscribeToEvent(NetworkEventType.FullSync); HideEverything(); @@ -393,7 +393,7 @@ namespace Marro.PacManUdon public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType == NetworkEventType.TimeSequenceSync) + if (eventType == NetworkEventType.FullSync) { data.Append(currentlyInTimeSequence, ref index); @@ -402,6 +402,12 @@ namespace Marro.PacManUdon data.AppendAsByte((int)currentTimeSequence, ref index); data.Append(timeSequenceSecondsPassed, ref index); } + + collisionManager.CollectSyncedData(data, ref index, eventType); + + ghostManager.CollectSyncedData(data, ref index, eventType); + + pacMan.CollectSyncedData(data, ref index, eventType); } //data[offset++] = new byte[] { NetworkManager.Int32ToByte((int)gameState) }; @@ -415,9 +421,10 @@ namespace Marro.PacManUdon if (eventType == NetworkEventType.StartGameButtonPressed) { StartGameButtonPressed(); + return true; } - if (eventType == NetworkEventType.TimeSequenceSync) + if (eventType == NetworkEventType.FullSync) { var currentlyInTimeSequence = data.ReadBool(ref index); if (currentlyInTimeSequence) @@ -430,6 +437,12 @@ namespace Marro.PacManUdon { TimeSequenceTryEndCurrent(); } + + collisionManager.WriteSyncedData(data, ref index, eventType); + + ghostManager.WriteSyncedData(data, ref index, eventType); + + pacMan.WriteSyncedData(data, ref index, eventType); } //SetGameState((PacManGameState)data[offset++]); diff --git a/Assets/Scripts/Ghost.cs b/Assets/Scripts/Ghost.cs index deef668..75629f2 100644 --- a/Assets/Scripts/Ghost.cs +++ b/Assets/Scripts/Ghost.cs @@ -113,8 +113,6 @@ namespace Marro.PacManUdon Index = index; - SubscribeToEvent(NetworkEventType.GhostUpdate); - targetIndicator.transform.parent = transform.parent; } @@ -808,7 +806,7 @@ namespace Marro.PacManUdon public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType != NetworkEventType.GhostUpdate) + if (eventType != NetworkEventType.FullSync) { return; } @@ -835,7 +833,7 @@ namespace Marro.PacManUdon public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType != NetworkEventType.GhostUpdate) + if (eventType != NetworkEventType.FullSync) { return true; } diff --git a/Assets/Scripts/GhostManager.cs b/Assets/Scripts/GhostManager.cs index f5dd221..fad6534 100644 --- a/Assets/Scripts/GhostManager.cs +++ b/Assets/Scripts/GhostManager.cs @@ -72,8 +72,6 @@ namespace Marro.PacManUdon ghosts[ghostIndex].Initialize(collisionManager, pacMan, blinky, startTransform, homePosition, idlePosition1, idlePosition2, cornerPosition, ghostIndex); } - - SubscribeToEvent(NetworkEventType.GhostUpdate); } public void RestartLevel(bool afterLifeLost = false) @@ -456,11 +454,6 @@ namespace Marro.PacManUdon public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType != NetworkEventType.GhostUpdate) - { - return; - } - // Power Pellet logic data.Append(powerPelletActive, ref index); data.Append(powerPelletCountdown, ref index); @@ -487,15 +480,15 @@ namespace Marro.PacManUdon data.Append(kinematic, ref index); data.AppendAsByte(gameController.Level, ref index); + + foreach (var ghost in ghosts) + { + ghost.CollectSyncedData(data, ref index, eventType); + } } public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType) { - if (eventType != NetworkEventType.GhostUpdate) - { - return true; - } - // Power Pellet logic powerPelletActive = data.ReadBool(ref index); powerPelletCountdown = data.ReadFloat(ref index); @@ -524,6 +517,11 @@ namespace Marro.PacManUdon var level = data.ReadByte(ref index); SetLevelConstants(level); + foreach (var ghost in ghosts) + { + ghost.WriteSyncedData(data, ref index, eventType); + } + return true; } diff --git a/Assets/Scripts/NetworkManager.cs b/Assets/Scripts/NetworkManager.cs index 5ad5d10..3ff7d12 100644 --- a/Assets/Scripts/NetworkManager.cs +++ b/Assets/Scripts/NetworkManager.cs @@ -17,9 +17,6 @@ namespace Marro.PacManUdon FullSync = 1, PacManTurn = 2, StartGameButtonPressed = 3, - SyncPellets = 4, - GhostUpdate = 5, - TimeSequenceSync = 6, Pause = 7, Resume = 8, Step = 9, @@ -544,13 +541,15 @@ namespace Marro.PacManUdon InitializeEvent(eventType, timestamp, eventId, out byte[] data, out var index); - var subscibers = GetEventSubscribers(eventType); + var effectiveEventType = eventType == NetworkEventType.FullSyncForced ? NetworkEventType.FullSync : eventType; + + var subscibers = GetEventSubscribers(effectiveEventType); if (subscibers != null) { foreach (var obj in subscibers) { - obj.CollectSyncedData(data, ref index, eventType); + obj.CollectSyncedData(data, ref index, effectiveEventType); } } @@ -838,6 +837,11 @@ namespace Marro.PacManUdon return false; } + if (eventType == NetworkEventType.FullSyncForced) + { + eventType = NetworkEventType.FullSync; + } + var index = (int)HeaderLength; // Skip header var subscribers = GetEventSubscribers(eventType); @@ -1192,22 +1196,7 @@ namespace Marro.PacManUdon public void DoFullSync() { - SendEventSoon(NetworkEventType.FullSync); - } - - public void DoPelletSync() - { - SendEventSoon(NetworkEventType.SyncPellets); - } - - public void DoGhostSync() - { - SendEventSoon(NetworkEventType.GhostUpdate); - } - - public void DoTimeSequenceSync() - { - SendEventSoon(NetworkEventType.TimeSequenceSync); + SendEventSoon(NetworkEventType.FullSyncForced); } public void Pause() diff --git a/Assets/Scripts/PacMan.asset b/Assets/Scripts/PacMan.asset index 50632ad..549a077 100644 --- a/Assets/Scripts/PacMan.asset +++ b/Assets/Scripts/PacMan.asset @@ -43,7 +43,7 @@ MonoBehaviour: Data: - Name: Entry: 12 - Data: 23 + Data: 22 - Name: Entry: 7 Data: @@ -433,19 +433,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: defaultSpeed + Data: animator - Name: $v Entry: 7 Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: defaultSpeed + Data: animator - Name: k__BackingField Entry: 7 Data: 25|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: System.Single, mscorlib + Data: UnityEngine.Animator, UnityEngine.AnimationModule - Name: Entry: 8 Data: @@ -487,214 +487,16 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: powerPelletSpeed + Data: renderer - Name: $v Entry: 7 Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: powerPelletSpeed - - Name: k__BackingField - Entry: 9 - Data: 25 - - Name: k__BackingField - Entry: 9 - Data: 25 - - 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: 28|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: speed - - Name: $v - Entry: 7 - Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: speed - - Name: k__BackingField - Entry: 9 - Data: 25 - - Name: k__BackingField - Entry: 9 - Data: 25 - - 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: 30|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: startPosition - - Name: $v - Entry: 7 - Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: startPosition - - 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: 32|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: animator - - Name: $v - Entry: 7 - Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: animator - - Name: k__BackingField - Entry: 7 - Data: 34|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: UnityEngine.Animator, UnityEngine.AnimationModule - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 34 - - 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: 35|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: renderer - - Name: $v - Entry: 7 - Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: renderer - Name: k__BackingField Entry: 7 - Data: 37|System.RuntimeType, mscorlib + Data: 28|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.Renderer, UnityEngine.CoreModule @@ -703,7 +505,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 37 + Data: 28 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -718,7 +520,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -739,25 +541,223 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: hideUntilUnfrozen + Data: startPosition - Name: $v Entry: 7 - Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: hideUntilUnfrozen + Data: startPosition + - 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: 31|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: defaultSpeed + - Name: $v + Entry: 7 + Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: defaultSpeed - Name: k__BackingField Entry: 7 - Data: 40|System.RuntimeType, mscorlib + Data: 33|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: System.Boolean, mscorlib + Data: System.Single, mscorlib - Name: Entry: 8 Data: - Name: k__BackingField Entry: 9 - Data: 40 + Data: 33 + - 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: 34|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: powerPelletSpeed + - Name: $v + Entry: 7 + Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: powerPelletSpeed + - Name: k__BackingField + Entry: 9 + Data: 33 + - Name: k__BackingField + Entry: 9 + Data: 33 + - 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: 36|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: state + - Name: $v + Entry: 7 + Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: state + - Name: k__BackingField + Entry: 7 + Data: 38|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: Marro.PacManUdon.PacManState, Assembly-CSharp + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 11 + - 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: 39|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: speed + - Name: $v + Entry: 7 + Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: speed + - Name: k__BackingField + Entry: 9 + Data: 33 + - Name: k__BackingField + Entry: 9 + Data: 33 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -793,19 +793,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: dead + Data: freezeSeconds - Name: $v Entry: 7 Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: dead + Data: freezeSeconds - Name: k__BackingField Entry: 9 - Data: 40 + Data: 33 - Name: k__BackingField Entry: 9 - Data: 40 + Data: 33 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -841,19 +841,73 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: kinematic + Data: frozen - Name: $v Entry: 7 Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: frozen + - Name: k__BackingField + Entry: 7 + Data: 45|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: System.Boolean, mscorlib + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 45 + - 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: 46|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: kinematic + - Name: $v + Entry: 7 + Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: kinematic - Name: k__BackingField Entry: 9 - Data: 40 + Data: 45 - Name: k__BackingField Entry: 9 - Data: 40 + Data: 45 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -868,7 +922,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 45|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -892,16 +946,16 @@ MonoBehaviour: Data: followingPredefinedPath - Name: $v Entry: 7 - Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: followingPredefinedPath - Name: k__BackingField Entry: 9 - Data: 40 + Data: 45 - Name: k__BackingField Entry: 9 - Data: 40 + Data: 45 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -916,7 +970,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 47|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 50|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -940,13 +994,13 @@ MonoBehaviour: Data: predefinedPath - Name: $v Entry: 7 - Data: 48|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 51|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: predefinedPath - Name: k__BackingField Entry: 7 - Data: 49|System.RuntimeType, mscorlib + Data: 52|System.RuntimeType, mscorlib - Name: Entry: 1 Data: Marro.PacManUdon.Direction[], Assembly-CSharp @@ -955,7 +1009,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 7 - Data: 50|System.RuntimeType, mscorlib + Data: 53|System.RuntimeType, mscorlib - Name: Entry: 1 Data: System.Int32[], mscorlib @@ -976,7 +1030,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 51|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 54|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1000,7 +1054,7 @@ MonoBehaviour: Data: predefinedPathIndex - Name: $v Entry: 7 - Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 55|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: predefinedPathIndex @@ -1024,103 +1078,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 53|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: freezeSeconds - - Name: $v - Entry: 7 - Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: freezeSeconds - - Name: k__BackingField - Entry: 9 - Data: 25 - - Name: k__BackingField - Entry: 9 - Data: 25 - - 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: 55|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: frozen - - Name: $v - Entry: 7 - Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: frozen - - Name: k__BackingField - Entry: 9 - Data: 40 - - Name: k__BackingField - Entry: 9 - Data: 40 - - 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: 57|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 56|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1144,7 +1102,7 @@ MonoBehaviour: Data: animatorKeyState - Name: $v Entry: 7 - Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 57|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: animatorKeyState @@ -1168,7 +1126,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 59|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 58|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1192,7 +1150,7 @@ MonoBehaviour: Data: animatorKeyDirection - Name: $v Entry: 7 - Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 59|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: animatorKeyDirection @@ -1216,7 +1174,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 61|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 60|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 diff --git a/Assets/Scripts/Sequences/TimeSequenceShared.cs b/Assets/Scripts/Sequences/TimeSequenceShared.cs index e613bfc..76a77ef 100644 --- a/Assets/Scripts/Sequences/TimeSequenceShared.cs +++ b/Assets/Scripts/Sequences/TimeSequenceShared.cs @@ -96,7 +96,6 @@ namespace Marro.PacManUdon private void TimeSequenceFinish(PacManTimeSequence timeSequence) { TimeSequenceExecuteFinalize(timeSequence); - networkManager.SendEventSoon(NetworkEventType.TimeSequenceSync); if (!jumpingToTimeSequence) { TimeSequenceExecuteFinished(timeSequence);