Examples of createEntity()


Examples of com.artemis.World.createEntity()

  @Test @SuppressWarnings("static-method")
  public void empty_packed_shouldnt_reference_bytbuffer() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e1 = world.createEntity();
    EmptyPacked empty = e1.createComponent(EmptyPacked.class);
    assertEquals(PackedComponent.class, empty.getClass().getSuperclass());
  }
}
View Full Code Here

Examples of com.artemis.World.createEntity()

  @Test @SuppressWarnings("static-method")
  public void pooled_class_transformation() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e = world.createEntity();
    PooledAllFields pooled = e.createComponent(PooledAllFields.class);
    assertEquals(PooledComponent.class, pooled.getClass().getSuperclass());
   
    Method reset = pooled.getClass().getMethod("reset");
    reset.setAccessible(true);
View Full Code Here

Examples of com.artemis.World.createEntity()

  @Test @SuppressWarnings("static-method")
  public void pooled_class_with_many_constructors() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e1 = world.createEntity();
    PolyConstructor pooled1 = e1.createComponent(PolyConstructor.class);
    assertEquals(PooledComponent.class, pooled1.getClass().getSuperclass());

    PolyConstructor pooled2 = new PolyConstructor(420);
    assertEquals(PooledComponent.class, pooled2.getClass().getSuperclass());
View Full Code Here

Examples of com.artemis.World.createEntity()

  @Test(expected=MundaneWireException.class)
  public void throw_exception_missing_uuid_manager() {
    World world = new World();
    world.initialize();
   
    Entity entity = world.createEntity();
   
    Assert.assertNotNull(entity.getUuid());
  }
 
  @Test
View Full Code Here

Examples of com.artemis.World.createEntity()

  public void uuid_assigned() {
    World world = new World();
    world.setManager(new UuidEntityManager());
    world.initialize();
   
    Entity entity = world.createEntity();
   
    assertNotNull(entity.getUuid());
    UUID uuid1 = entity.getUuid();
    world.deleteEntity(entity);
   
View Full Code Here

Examples of com.artemis.World.createEntity()

    world.deleteEntity(entity);
   
    world.process();
    world.process();
   
    entity = world.createEntity();
   
    assertNotNull(entity.getUuid());
    UUID uuid2 = entity.getUuid();

    assertNotEquals(uuid1, uuid2);
View Full Code Here

Examples of com.artemis.World.createEntity()

  public void uuid_updates_work() {
    World world = new World();
    UuidEntityManager uuidManager = world.setManager(new UuidEntityManager());
    world.initialize();
   
    Entity entity = world.createEntity();
   
    UUID uuid0 = entity.getUuid();
    Assert.assertNotNull(uuid0);
   
    UUID uuid1 = UUID.randomUUID();
View Full Code Here

Examples of com.artemis.World.createEntity()

    UUID[] uuids = new UUID[3];
    uuids[0] = UUID.randomUUID();
    uuids[1] = UUID.randomUUID();
    uuids[2] = UUID.randomUUID();
   
    Entity e1 = world.createEntity(uuids[0]);
    Entity e2 = world.createEntity(uuids[1]);
    Entity e3 = world.createEntity(uuids[2]);
   
    assertEquals(uuids[0], e1.getUuid());
    assertEquals(uuids[1], e2.getUuid());
View Full Code Here

Examples of com.artemis.World.createEntity()

    uuids[0] = UUID.randomUUID();
    uuids[1] = UUID.randomUUID();
    uuids[2] = UUID.randomUUID();
   
    Entity e1 = world.createEntity(uuids[0]);
    Entity e2 = world.createEntity(uuids[1]);
    Entity e3 = world.createEntity(uuids[2]);
   
    assertEquals(uuids[0], e1.getUuid());
    assertEquals(uuids[1], e2.getUuid());
    assertEquals(uuids[2], e3.getUuid());
View Full Code Here

Examples of com.artemis.World.createEntity()

    uuids[1] = UUID.randomUUID();
    uuids[2] = UUID.randomUUID();
   
    Entity e1 = world.createEntity(uuids[0]);
    Entity e2 = world.createEntity(uuids[1]);
    Entity e3 = world.createEntity(uuids[2]);
   
    assertEquals(uuids[0], e1.getUuid());
    assertEquals(uuids[1], e2.getUuid());
    assertEquals(uuids[2], e3.getUuid());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.