コード例 #1
0
    private void Update()
    {
        if (GameState.currentState == GameStates.WAITING_FOR_PLAYERS)
        {
            bool hasEnoughPlayers = true;
            foreach (Team team in GameState.teams.Values)
            {
                if (team.players.Count < minPlayersPerTeam)
                {
                    hasEnoughPlayers = false;
                    break;
                }
            }
            if (hasEnoughPlayers)
            {
                StartGame();
            }
        }

        if (CapturePoints != null && CapturePoints.Count > 0)
        {
            serverNetworkManager.BroadcastCapturePoints(CapturePoints);
        }
    }