Score not deducting correctly bug fixed.

dev-ali
Ali Sharoz 3 days ago
parent e3d447d0d2
commit 93b5425466

@ -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

@ -50,9 +50,12 @@ public class CrowManager : NetworkBehaviour
/// <summary>
/// Determines which player should be the crow.
/// </summary>
int unoccupiedPlayers = 0;
private void DetermineCrow()
{
int unoccupiedPlayers = 0;
unoccupiedPlayers = 0;
ServerCharacter potentialCrow = null;
foreach (var player in players)

@ -15,7 +15,6 @@ namespace Unity.Multiplayer.Samples.BossRoom
private NetworkVariable<ulong> occupierId = new NetworkVariable<ulong>(0, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server);
private Collider platformCollider;
private Animator animator;
private void Awake()
{
platformCollider = GetComponent<Collider>();
@ -24,12 +23,18 @@ namespace Unity.Multiplayer.Samples.BossRoom
animator = GetComponent<Animator>();
}
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();

@ -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)
{

Loading…
Cancel
Save