|
|
|
@ -109,21 +109,25 @@ public class CrowManager : NetworkBehaviour
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Clears the current Crow if no player is unoccupied.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void ClearCrow()
|
|
|
|
|
public void ClearCrow()
|
|
|
|
|
{
|
|
|
|
|
if (currentCrow != null)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log($"[CrowManager] {currentCrow.name} landed on a platform. Removing crow status.");
|
|
|
|
|
currentCrow.SetAsCrow(false);
|
|
|
|
|
Debug.Log($"{currentCrow.name} is no longer the Crow.");
|
|
|
|
|
currentCrow = null;
|
|
|
|
|
|
|
|
|
|
// Notify all clients about the crow being cleared
|
|
|
|
|
NotifyCrowChangeClientRpc(0); // 0 indicates no crow
|
|
|
|
|
// Notify all clients that the crow role is cleared
|
|
|
|
|
NotifyCrowChangeClientRpc(0); // 0 means no crow
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Recalculate crow status after removing the old crow
|
|
|
|
|
DetermineCrow();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// RPC to notify clients about the Crow change.
|
|
|
|
|
/// </summary>
|
|
|
|
|