use of ilargia.entitas.components.Position in project Entitas-Java by Rubentxu.
the class GroupTest method setUp.
@Before
public void setUp() throws Exception {
createCollections();
entity = new TestEntity();
entity.initialize(0, 10, new Stack[10], new ContextInfo("Test", TestComponentIds.componentNames(), TestComponentIds.componentTypes()), null);
entity.clearEventsListener();
entity.reactivate(0);
entity.addComponent(TestComponentIds.Position, new Position(100, 100));
entity.addComponent(TestComponentIds.View, new View(1));
group = new Group<TestEntity>(TestMatcher.Position(), TestEntity.class);
group2 = new Group(TestMatcher.Interactive(), Entity.class);
}
use of ilargia.entitas.components.Position in project Entitas-Java by Rubentxu.
the class SystemsTest method addReactiveSystem2Test.
@Test
public void addReactiveSystem2Test() {
TestReactive reactiveSystem = new TestReactive(context);
Object contextsTest = new Object();
systems.add(reactiveSystem);
systems.deactivateReactiveSystems();
context.createEntity().addComponent(TestComponentIds.Position, new Position(100, 100));
systems.execute(1);
context.createEntity().addComponent(TestComponentIds.Position, new Position(100, 100));
systems.execute(1);
// assertTrue(reactiveSystem.flagExecute);
}
Aggregations