use of ilargia.entitas.api.IGroup in project Entitas-Java by Rubentxu.
the class ContextTest method updateGroupsComponentReplacedTest.
@Test
public void updateGroupsComponentReplacedTest() {
Position position = new Position();
Position position2 = new Position();
Group<TestEntity> groupE = context.getGroup(TestMatcher.Position());
groupE.OnEntityUpdated((IGroup<TestEntity> group, final TestEntity entity, int index, IComponent previousComponent, IComponent nc) -> {
System.out.println("Removed...........");
assertEquals(position2, nc);
});
entity.addComponent(TestComponentIds.Position, position);
context.updateGroupsComponentReplaced(entity, TestComponentIds.Position, position, position2, context._groupsForIndex);
}
Aggregations