use of ilargia.entitas.components.Motion in project Entitas-Java by Rubentxu.
the class EntityTest method replaceNotExistComponentTest.
@Test
public void replaceNotExistComponentTest() {
entity.replaceComponent(TestComponentIds.Motion, new Motion(50F, 50F));
assertEquals(50F, ((Motion) entity.getComponent(TestComponentIds.Motion)).x, 0.1F);
}
use of ilargia.entitas.components.Motion in project Entitas-Java by Rubentxu.
the class EntityTest method falseReplaceComponentTest.
@Test
public void falseReplaceComponentTest() {
entity.replaceComponent(TestComponentIds.Motion, new Motion(50F, 50F));
assertNotEquals(100F, ((Motion) entity.getComponent(TestComponentIds.Motion)).x, 0.1F);
}
use of ilargia.entitas.components.Motion 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));
}
Aggregations