Package com.artemis

Examples of com.artemis.World$EnabledPerformer


  World world;
  Entity e1, e2;

  @Before
  public void setup() {
    world = new World();
    world.initialize();
   
    e1 = world.createEntity();
   
    e2 = world.createEntity();
View Full Code Here


  private World world;
  private GroupManager gm;

  @Before
  public void setUp() throws Exception {
    world = new World();
    gm = world.setManager(new GroupManager());
    world.initialize();
  }
View Full Code Here

  private static final float ACC = 0.0001f;

  @Test
  public void test_interval_delta() {
   
    World world = new World();
    IntervalSystem es = world.setSystem(new IntervalSystem());
    world.initialize();
   
    world.delta = 1.1f;
    world.process();
    assertEquals(1.1, es.getIntervalDelta(), ACC);
   
    world.delta = 0.95f;
    world.process();
    assertEquals(0.95, es.getIntervalDelta(), ACC);
  }
View Full Code Here

@SuppressWarnings("static-method")
public class UuidEntityManagerTest {
 
  @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());
  }
View Full Code Here

    Assert.assertNotNull(entity.getUuid());
  }
 
  @Test
  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);
   
    world.process();
    world.process();
   
    entity = world.createEntity();
   
    assertNotNull(entity.getUuid());
    UUID uuid2 = entity.getUuid();

    assertNotEquals(uuid1, uuid2);
View Full Code Here

    assertNotEquals(uuid1, uuid2);
  }
 
  @Test
  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

    assertEquals(entity, uuidManager.getEntity(uuid1));
  }
 
  @Test
  public void explicit_uuids() {
    World world = new World();
    world.setManager(new UuidEntityManager());
    world.initialize();
   
    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());
    assertEquals(uuids[2], e3.getUuid());
  }
View Full Code Here

 
  private World world;

  @Before
  public void setup() {
    world = new World();
    world.initialize();
  }
View Full Code Here

      }
    }
  }

  private void initialize() {
    world = new World();

    world.setSystem(new HealthSystem());
    world.setSystem(new PhysicsSystem());
    world.setSystem(new ExpirationSystem());
    world.setSystem(new BoundarySystem(0, 0, 4096, 4096));
View Full Code Here

    super(title);
  }

  @Override
  public void init(GameContainer container) throws SlickException {
    world = new World();

    world.setManager(new PlayerManager());
    world.setManager(new TagManager());
    world.setManager(new GroupManager());
View Full Code Here

TOP

Related Classes of com.artemis.World$EnabledPerformer

Copyright © 2018 www.massapicom. 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.