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); } } }
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; } } }
public void OnChange1() { Team2.Add(SelectedTeamMember1); Team1.Remove(SelectedTeamMember1); }