Пример #1
0
    void RemoveBotFromTeam(TeamBot teamBot)
    {
        if (userTeams[0] == teamBot.CurrentTeam)
        {
            int i = team1.FindIndex(bot => bot.BotInfo == teamBot.BotInfo);
            team1[i].BotInfo = defaultBotInfo;
        }

        if (teamBot.CurrentTeam == userTeams[1])
        {
            int i = team2.FindIndex(bot => bot.BotInfo == teamBot.BotInfo);
            team2[i].BotInfo = defaultBotInfo;
        }

        if (teamBot.CurrentTeam == userTeams[2])
        {
            int i = team3.FindIndex(bot => bot.BotInfo == teamBot.BotInfo);
            team3[i].BotInfo = defaultBotInfo;
        }
        removeMenu.gameObject.SetActive(false);
    }
Пример #2
0
 public void ShowRemoveMenu(TeamBot teamBot)
 {
     gameObject.SetActive(true);
     TeamBot = teamBot;
 }
Пример #3
0
 private void ShowRemoveMenu(TeamBot teamBot)
 {
     removeMenu.transform.position = MousePosition();
     removeMenu.ShowRemoveMenu(teamBot);
 }
Пример #4
0
 public void CancelRemoveMenu()
 {
     TeamBot = null;
     gameObject.SetActive(false);
 }