Package com.badlogic.ashley.benchmark.ashley.components

Examples of com.badlogic.ashley.benchmark.ashley.components.PositionComponent


   
    for (int i = 0; i < numEntities; ++i) {
      Entity entity = new Entity();
     
      if (Constants.shouldHaveComponent(ComponentType.POSITION, i)) {
        PositionComponent pos = new PositionComponent();
        pos.pos.x = MathUtils.random(Constants.MIN_POS, Constants.MAX_POS);
        pos.pos.y = MathUtils.random(Constants.MIN_POS, Constants.MAX_POS);
        entity.add(pos);
      }
     
View Full Code Here


    super(Family.getFor(PositionComponent.class, MovementComponent.class));
  }

  @Override
  public void processEntity(Entity entity, float deltaTime) {
    PositionComponent pos = pm.get(entity);
    MovementComponent mov = mm.get(entity);
   
    tmp.set(mov.accel).scl(deltaTime);
    mov.velocity.add(tmp);
   
View Full Code Here

TOP

Related Classes of com.badlogic.ashley.benchmark.ashley.components.PositionComponent

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.