diff --git a/Assets/Scenes/BossRoom/DungeonEntrance.unity b/Assets/Scenes/BossRoom/DungeonEntrance.unity index 8c42fe8..300b620 100644 --- a/Assets/Scenes/BossRoom/DungeonEntrance.unity +++ b/Assets/Scenes/BossRoom/DungeonEntrance.unity @@ -614,7 +614,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 @@ -809,7 +809,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 @@ -1005,7 +1005,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 @@ -1185,7 +1185,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 @@ -1365,7 +1365,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 @@ -1545,7 +1545,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 @@ -1725,7 +1725,7 @@ MeshCollider: m_LayerOverridePriority: 0 m_IsTrigger: 1 m_ProvidesContacts: 0 - m_Enabled: 1 + m_Enabled: 0 serializedVersion: 5 m_Convex: 1 m_CookingOptions: 30 diff --git a/Assets/Scripts/Gameplay/CrowManager.cs b/Assets/Scripts/Gameplay/CrowManager.cs index 47963ba..961499c 100644 --- a/Assets/Scripts/Gameplay/CrowManager.cs +++ b/Assets/Scripts/Gameplay/CrowManager.cs @@ -50,9 +50,12 @@ public class CrowManager : NetworkBehaviour /// /// Determines which player should be the crow. /// + int unoccupiedPlayers = 0; + private void DetermineCrow() { - int unoccupiedPlayers = 0; + unoccupiedPlayers = 0; + ServerCharacter potentialCrow = null; foreach (var player in players) diff --git a/Assets/Scripts/Gameplay/Platform.cs b/Assets/Scripts/Gameplay/Platform.cs index a7bb1de..e07f940 100644 --- a/Assets/Scripts/Gameplay/Platform.cs +++ b/Assets/Scripts/Gameplay/Platform.cs @@ -15,7 +15,6 @@ namespace Unity.Multiplayer.Samples.BossRoom private NetworkVariable occupierId = new NetworkVariable(0, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); private Collider platformCollider; private Animator animator; - private void Awake() { platformCollider = GetComponent(); @@ -24,12 +23,18 @@ namespace Unity.Multiplayer.Samples.BossRoom animator = GetComponent(); } - + private void Start() + { + Invoke(nameof(ColliderEnabler),2); + } public void AssignID(int id) { if (IsServer) PlatformID.Value = id; } - + void ColliderEnabler() + { + platformCollider.enabled = true; + } public void StartRotation() => transform.DOLocalRotate(Vector3.up, 120).SetSpeedBased(true).SetId(PlatformID).SetLoops(-1, LoopType.Incremental); private void PauseRotation() => DOTween.Pause(PlatformID); @@ -65,6 +70,7 @@ namespace Unity.Multiplayer.Samples.BossRoom public void Occupy(ServerCharacter player) { + Debug.Log("Platform Occupied by: " + player.uIStateDisplayHandler.m_UIState.playerName); if (!IsServer || IsOccupied) return; Pause(); diff --git a/Assets/Scripts/Gameplay/PlatformManager.cs b/Assets/Scripts/Gameplay/PlatformManager.cs index d7fec63..5183d8c 100644 --- a/Assets/Scripts/Gameplay/PlatformManager.cs +++ b/Assets/Scripts/Gameplay/PlatformManager.cs @@ -141,7 +141,7 @@ namespace Unity.Multiplayer.Samples.BossRoom return m_Platforms.All(platform => platform.IsOccupied); } - public bool AssignPlayerToPlatform(ServerCharacter player) + /*public bool AssignPlayerToPlatform(ServerCharacter player) { if (!IsServer) { @@ -158,7 +158,7 @@ namespace Unity.Multiplayer.Samples.BossRoom Debug.LogWarning($"No unoccupied platforms available for {player.name}."); return false; - } + }*/ public Platform GetPlatformOccupiedByPlayer(ServerCharacter player) {