Package com.badlogic.ashley.tests.utils

Examples of com.badlogic.ashley.tests.utils.Timer.start()


    engine.addSystem(new MovementSystem());
   
    System.out.println("Number of entities: " + NUMBER_ENTITIES);
   
    /** Adding entities */
    timer.start("entities");
   
    entities.ensureCapacity(NUMBER_ENTITIES);
   
    for(int i=0; i<NUMBER_ENTITIES; i++){
      Entity entity = engine.createEntity();
View Full Code Here


    }
   
    System.out.println("Entities added time: " + timer.stop("entities") + "ms");
   
    /** Removing components */
    timer.start("componentRemoved");
   
    for(Entity e:entities){
      e.remove(PositionComponent.class);
    }
   
View Full Code Here

    }
   
    System.out.println("Component removed time: " + timer.stop("componentRemoved") + "ms");
   
    /** Adding components */
    timer.start("componentAdded");
   
    for(Entity e:entities){
      e.add(new PositionComponent(0, 0));
    }
   
View Full Code Here

    }
   
    System.out.println("Component added time: " + timer.stop("componentAdded") + "ms");
   
    /** System processing */
    timer.start("systemProcessing");
   
    engine.update(0);
   
    System.out.println("System processing times " + timer.stop("systemProcessing") + "ms");
   
View Full Code Here

    engine.update(0);
   
    System.out.println("System processing times " + timer.stop("systemProcessing") + "ms");
   
    /** Removing entities */
    timer.start("entitiesRemoved");
   
    engine.removeAllEntities();
   
    System.out.println("Entity removed time: " + timer.stop("entitiesRemoved") + "ms");
  }
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.