Namespace: DeltaEngine.Entities
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Entities.EntitiesRunnerTests
4 unit tests call DeltaEngine.Entities.EntitiesRunner.GetAllEntities
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Return Value
Type: List EntityRemarks
Examples
[Test] public void GetAllEntitiesWithCertainTag() { new MockEntity().AddTag("test1"); new MockEntity().AddTag("test1"); Assert.AreEqual(0, EntitiesRunner.Current.GetEntitiesWithTag("abc").Count); Assert.AreEqual(2, EntitiesRunner.Current.GetEntitiesWithTag("test1").Count); }
[Test] public void GetAllEntitiesWithHandlersThatHaveATag() { new MockEntity().Start<IncrementCounter>().AddTag("abc"); new MockEntity().Start<IncrementCounter>().AddTag("abc"); Assert.AreEqual(2, EntitiesRunner.Current.GetEntitiesWithTag("abc").Count); }
[Test] public void GetAllEntitiesOfCertainType() { new MockEntity(); new MockEntity(); Assert.AreEqual(2, EntitiesRunner.Current.GetEntitiesOfType<MockEntity>().Count); }
See Also