Esempio n. 1
0
    public void Winner(BoardItem.Team team)
    {
        winner.gameObject.SetActive(true);
        string teamNumber = (_teamNumers.IndexOf(team) + 1).ToString();

        winner.text = "Winner: Team " + teamNumber;
        message.SetText("");
    }
Esempio n. 2
0
    public void AddBot(BoardItem.Team team, Bot bot)
    {
        if (!_teamNumers.Contains(team))
        {
            _teamNumers.Add(team);
        }

        int teamNumber = _teamNumers.IndexOf(team);

        Debug.Log("Add Team " + teamNumber);

        if (teamNumber == 0)
        {
            team1Players [team1PlayerCount].bot = bot;
            team1Players [team1PlayerCount].gameObject.SetActive(true);
            team1PlayerCount += 1;
        }
        if (teamNumber == 1)
        {
            team2Players [team2PlayerCount].bot = bot;
            team2Players [team2PlayerCount].gameObject.SetActive(true);
            team2PlayerCount += 1;
        }
        if (teamNumber == 2)
        {
            team3Players [team3PlayerCount].bot = bot;
            team3Players [team3PlayerCount].gameObject.SetActive(true);
            team3PlayerCount += 1;
        }
        if (teamNumber == 3)
        {
            team4Players [team4PlayerCount].bot = bot;
            team4Players [team4PlayerCount].gameObject.SetActive(true);
            team4PlayerCount += 1;
        }
    }