Beispiel #1
0
    public void AssignTeam(TankSetup player)
    {
        TeamColor team;

        if (BlueTeam.Count() == RedTeam.Count())
        {
            team = (TeamColor)UnityEngine.Random.Range(1, Enum.GetValues(typeof(TeamColor)).Length);
        }
        else
        {
            team = BlueTeam.Count > RedTeam.Count ? TeamColor.Red : TeamColor.Blue;
        }
        player.m_TeamID = team;
    }