Package com.artemis.system

Examples of com.artemis.system.ExpirationSystem


   
    world.process();
  }
 
  public void test_delayed_entity_procesing_ensure_entities_processed() {
    ExpirationSystem es = new ExpirationSystem();
    world.setSystem(es);
    world.initialize();
   
    Entity e1 = createEntity();
   
    world.setDelta(0.5f);
    world.process();
    assertEquals(0, es.expiredLastRound);
   
    Entity e2 = createEntity();
   
    world.setDelta(0.75f);
    world.process();
    assertEquals(1, es.expiredLastRound);
    assertEquals(0.25f, es.deltas.get(e2.getId()), 0.01f);
    world.delta = 0;
    world.process();
    assertEquals(1, es.getActives().size());
   
    world.setDelta(0.5f);
    world.process();
   
    assertEquals(1, es.expiredLastRound);
   
    world.process();
    assertEquals(0, es.getActives().size());
  }
View Full Code Here

TOP

Related Classes of com.artemis.system.ExpirationSystem

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.