Examples of ExpirationSystem


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

Examples of com.tankz.systems.misc.ExpirationSystem

  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));
    world.setSystem(new AmmoRegenerationSystem());

    world.initialize();
  }
View Full Code Here

Examples of com.tankz.systems.misc.ExpirationSystem

    world.setManager(new GroupManager());

    world.setSystem(new SoundSystem());
    world.setSystem(new HealthSystem());
    world.setSystem(new PhysicsSystem());
    world.setSystem(new ExpirationSystem());
    world.setSystem(new PlayerTankTowerSystem(container));
    world.setSystem(new PlayerTankMovementSystem(container));
    world.setSystem(new BoundarySystem(0, 0, 4096, 4096));
    world.setSystem(new CameraSystem(container));
    world.setSystem(new AmmoRegenerationSystem());
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.