public void Dispose_Should_dispose_created_entity() { using EntityCommandRecorder recorder = new(1024); using World world = new(); EntityRecord record = recorder.CreateEntity(world); record.Dispose(); recorder.Execute(); Check.That(world.Count()).IsEqualTo(0); }
public void Dispose_Should_dispose_created_entity() { using (EntityCommandRecorder recorder = new EntityCommandRecorder(1024)) using (World world = new World()) { EntityRecord record = recorder.CreateEntity(); record.Dispose(); recorder.Execute(world); Check.That(world.GetAllEntities().Count()).IsEqualTo(0); } }
public void Dispose_Should_dispose_recorded_entity() { using EntityCommandRecorder recorder = new(1024); using World world = new(); Entity entity = world.CreateEntity(); EntityRecord record = recorder.Record(entity); record.Dispose(); recorder.Execute(); Check.That(entity.IsAlive).IsFalse(); }