Search in sources :

Example 1 with EntitasCache

use of ilargia.entitas.caching.EntitasCache in project Entitas-Java by Rubentxu.

the class EntityTest method setUp.

@Before
public void setUp() throws Exception {
    createCollections();
    _componentPools = new Stack[10];
    EntitasCache cache = new EntitasCache();
    entity = new TestEntity();
    entity.initialize(0, 10, _componentPools, new ContextInfo("Test", TestComponentIds.componentNames(), TestComponentIds.componentTypes()));
    entity.clearEventsListener();
    entity.reactivate(0);
    entity.addComponent(TestComponentIds.Position, new Position(100, 100));
    entity.addComponent(TestComponentIds.View, new View(1));
}
Also used : TestEntity(ilargia.entitas.utils.TestEntity) EntitasCache(ilargia.entitas.caching.EntitasCache) Position(ilargia.entitas.components.Position) View(ilargia.entitas.components.View) ContextInfo(ilargia.entitas.api.ContextInfo) Before(org.junit.Before)

Aggregations

ContextInfo (ilargia.entitas.api.ContextInfo)1 EntitasCache (ilargia.entitas.caching.EntitasCache)1 Position (ilargia.entitas.components.Position)1 View (ilargia.entitas.components.View)1 TestEntity (ilargia.entitas.utils.TestEntity)1 Before (org.junit.Before)1