public void DestroyEntity(Entity entity) { foreach (var component in _components.Where(c => c.Entity == entity).ToArray()) { DetachComponent(component); } if (entity.Name != null) { _entitiesByName.Remove(entity.Name); } _entities.Remove(entity); EntityDestroyed?.Invoke(this, entity); }
private void Sprite_AnimationDone() { EntityDestroyed?.Invoke(this); }
private void OnEntityDestroyed(Entity entity) { EntityDestroyed?.Invoke(entity); }
public void EntityRemove(Entity e) { EntityDestroyed?.Invoke(e); }
public void Destroy(GameState gameState, Player player = null) { TileDestroyed?.Invoke(this, player); EntityDestroyed?.Invoke(this); }
internal void Destroyed() { EntityDestroyed?.Invoke(this, EventArgs.Empty); }
public void Destroy(GameState gameState) { EntityDestroyed?.Invoke(this); }