Пример #1
0
        public void Destroy_RemovesEntity()
        {
            var testEntity = engine.New("Test Entity");

            engine.Destroy(testEntity.EntityId);

            engine.AllEntities.Should().NotContain(testEntity);
        }
Пример #2
0
        private void DestroyItem_Internal(IEntity item, Inventory inventory)
        {
            if (inventory != null)
            {
                inventory.Contents.Remove(item);
            }

            entityEngine.Destroy(item);
        }
Пример #3
0
        public void Tick()
        {
            var entitiesAtStartOfTick = new List <IEntity>(Entities);

            foreach (var entity in entitiesAtStartOfTick)
            {
                if (!entity.Has <Moving>())
                {
                    _entityEngine.Destroy(entity);
                }
            }
        }
Пример #4
0
 protected override void Close()
 {
     _engine.Destroy(_displayEntity);
     base.Close();
 }