use of ilargia.entitas.api.entitas.IEntity in project Entitas-Java by Rubentxu.
the class EntityTest method OnComponentAddedTest.
@Test
public void OnComponentAddedTest() {
entity.OnComponentAdded((IEntity e, int index, IComponent c) -> assertEquals(TestComponentIds.Motion, index));
entity.addComponent(TestComponentIds.Motion, new Motion(100, 100));
}
use of ilargia.entitas.api.entitas.IEntity in project Entitas-Java by Rubentxu.
the class EntityTest method OnComponentReplacedTest.
@Test
public void OnComponentReplacedTest() {
entity.OnComponentReplaced((IEntity e, int index, IComponent c, IComponent n) -> assertEquals(33F, ((Position) n).x, 0.1f));
entity.replaceComponent(TestComponentIds.Position, new Position(33, 100));
}
Aggregations