Package com.badlogic.ashley.core

Examples of com.badlogic.ashley.core.PooledEngine.createEntity()


   
    Listener listener = new Listener();
    engine.addEntityListener(listener);
   
    for(int i=0; i<10; i++){
      Entity entity = engine.createEntity();
      entity.add(new PositionComponent(10, 0));
      if(i > 5)
        entity.add(new MovementComponent(10, 2));
     
      engine.addEntity(entity);
View Full Code Here


    timer.start("entities");
   
    entities.ensureCapacity(NUMBER_ENTITIES);
   
    for(int i=0; i<NUMBER_ENTITIES; i++){
      Entity entity = engine.createEntity();
     
      entity.add(new MovementComponent(10, 10));
      entity.add(new PositionComponent(0, 0));
     
      engine.addEntity(entity);
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.