コード例 #1
0
        public void RemovePlayer(string name)
        {
            foreach (var pl in Team1.ToArray())
            {
                if (pl.Name == name)
                {
                    Team1.Remove(pl);
                }
            }

            foreach (var pl in Team2.ToArray())
            {
                if (pl.Name == name)
                {
                    Team2.Remove(pl);
                }
            }
        }
コード例 #2
0
 public void DefenderDies(Character defender)
 {
     if (Team1.Contains(defender))
     {
         Team1.Remove(defender);
         if (Team1.Count <= 0)
         {
             WinnerTeam = Team2;
         }
     }
     if (Team2.Contains(defender))
     {
         Team2.Remove(defender);
         if (Team2.Count <= 0)
         {
             WinnerTeam = Team1;
         }
     }
 }
コード例 #3
0
 public void OnChange1()
 {
     Team2.Add(SelectedTeamMember1);
     Team1.Remove(SelectedTeamMember1);
 }