public void OnCharacterResurection(BaseClass resurrectedCharacter) { DeathCharacters.Remove(resurrectedCharacter); resurrectedCharacter.tag = resurrectedCharacter.TeamTag; if (resurrectedCharacter.TeamTag == "BlueTeam") { BlueTeamInBattle.Add(resurrectedCharacter); } else if (resurrectedCharacter.TeamTag == "RedTeam") { RedTeamInBattle.Remove(resurrectedCharacter); } }
public void AddToTeamList(BaseClass player) { if (player.CompareTag("BlueTeam")) { BlueTeamInBattle.Add(player); } else if (player.CompareTag("RedTeam")) { RedTeamInBattle.Add(player); } if (BlueTeamInBattle.Count >= 4 && RedTeamInBattle.Count >= 4) { client.StartUI(); } }