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

Examples of com.badlogic.ashley.benchmark.artemis.components.MovementComponent


        pos.pos.y = MathUtils.random(Constants.MIN_POS, Constants.MAX_POS);
        entity.addComponent(pos);
      }
     
      if (Constants.shouldHaveComponent(ComponentType.MOVEMENT, i)) {
        MovementComponent mov = new MovementComponent();
        mov.velocity.x = MathUtils.random(Constants.MIN_VEL, Constants.MAX_VEL);
        mov.velocity.y = MathUtils.random(Constants.MIN_VEL, Constants.MAX_VEL);
        mov.accel.x = MathUtils.random(Constants.MIN_ACC, Constants.MAX_ACC);
        mov.accel.y = MathUtils.random(Constants.MIN_ACC, Constants.MAX_ACC);
       
View Full Code Here


  };
 
  @Override
  protected void process(Entity entity) {
    PositionComponent pos = pm.get(entity);
    MovementComponent mov = mm.get(entity);
   
    tmp.set(mov.accel).scl(world.getDelta());
    mov.velocity.add(tmp);
   
    tmp.set(mov.velocity).scl(world.getDelta());
View Full Code Here

TOP

Related Classes of com.badlogic.ashley.benchmark.artemis.components.MovementComponent

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.