public void Destroy_RemovesEntity() { var testEntity = engine.New("Test Entity"); engine.Destroy(testEntity.EntityId); engine.AllEntities.Should().NotContain(testEntity); }
private void DestroyItem_Internal(IEntity item, Inventory inventory) { if (inventory != null) { inventory.Contents.Remove(item); } entityEngine.Destroy(item); }
public void Tick() { var entitiesAtStartOfTick = new List <IEntity>(Entities); foreach (var entity in entitiesAtStartOfTick) { if (!entity.Has <Moving>()) { _entityEngine.Destroy(entity); } } }
protected override void Close() { _engine.Destroy(_displayEntity); base.Close(); }