예제 #1
0
    private void ProcessJoin(int activePlayer, int teamChoice)
    {
        if (tempTeamChoices == null)
        {
            return;
        }

        if (CanJoinTeam(teamChoice))
        {
            tempTeamChoices[activePlayer] = teamChoice;

            startMenu.JoinTeam(activePlayer, teamChoice);
        }

        if (ShouldStart())
        {
            Array.Copy(tempTeamChoices, 0, teamChoices, 0, MAX_PLAYERS);
            AssignControllers();
            startMenu.gameObject.SetActive(false);
            SceneManager.LoadScene("Joe");
        }
    }