public virtual void RegisterEntity(Entity ent) { SubscribeToEntityEvents(ent); switch (ent.Team) { case EntityTeam.Players: players.Add(ent); OnPlayerCreated.Invoke(ent); break; case EntityTeam.Allies: allies.Add(ent); break; case EntityTeam.Enemies: enemies.Add(ent); OnEnemyCreated.Invoke(ent); break; } OnEntityCreated.Invoke(ent); }
public void EnemyCreated() => OnEnemyCreated?.Invoke();