private void OnHeroRemoved(object sender, Hero e) { var founder = Heroes.Find(x => x.Hero.Equals(e)); if (founder != null) { Heroes.Remove(founder); if (founder.IsAlly) { AllyHeroes.Remove(founder); } else { EnemyHeroes.Remove(founder); } } }
private void OnHeroRemoved(object sender, Hero e) { var founder = Heroes.Find(x => x.Hero.Equals(e)); if (founder != null) { Heroes.Remove(founder); if (founder.IsAlly) { AllyHeroes.Remove(founder); } else { EnemyHeroes.Remove(founder); } Log.Error($"ON REMOVED -> {e.Name}"); } }
void OnHeroDeath(int id) { Heroes.Remove(Heroes.Find(e => e.id == id)); allCharacters.Remove(id); }