Ejemplo n.º 1
0
 public void NotifyPlayerJoined(Player player)
 {
     playersReadyStates[player] = true;
     if (AllPlayersReady())
     {
         Debug.Log("All players ready!");
         AllReady?.Invoke();
     }
 }
Ejemplo n.º 2
0
        private void HandleOnPlayerStart(int playerIndex)
        {
            readyCards[playerIndex].ToggleReady();

            foreach (PlayerReadyCard readyCard in readyCards)
            {
                if (!readyCard.isActiveAndEnabled)
                {
                    continue;
                }
                if (!readyCard.Ready)
                {
                    return;
                }
            }

            AllReady?.Invoke();
        }