Examples of TurnFactor


Examples of com.tankz.components.TurnFactor

      player = world.getManager(TagManager.class).getEntity("PLAYER");
  }

  protected void updatePlayer(Entity e) {
    Velocity v = velocityMapper.get(e);
    TurnFactor tf = turnFactorMapper.get(e);
    Physics c = collidableMapper.get(e);
   
    updateMoving(e);
    //updateRotating(e);
View Full Code Here

Examples of com.tankz.components.TurnFactor

 
  private void updateRotating(Entity e) {
    Physics physics = collidableMapper.get(e);
   
    TurnFactor turnFactor = turnFactorMapper.get(e);

    if(turnRight) {
      physics.getBody().adjustRotation(turnFactor.getFactor() * (reverse?-1:1));
    }
    else if(turnLeft) {
      physics.getBody().adjustRotation(turnFactor.getFactor() * (reverse?-1:1));
    }
  }
 
View Full Code Here

Examples of com.tankz.components.TurnFactor

      player = world.getManager(TagManager.class).getEntity("PLAYER");
  }

  protected void updatePlayer(Entity e) {
    Velocity v = velocityMapper.get(e);
    TurnFactor tf = turnFactorMapper.get(e);
    Physics physics = physicsMapper.get(e);

    Tower tower = towerMapper.get(e);
    Ammo ammo = ammoMapper.get(e);
View Full Code Here

Examples of com.tankz.components.TurnFactor

    Entity e = world.createEntity();
    world.getManager(GroupManager.class).add(e, "tanks");

    e.addComponent(new SpatialForm("mammothTank"));
    e.addComponent(new Velocity());
    e.addComponent(new TurnFactor());
    e.addComponent(new Tower());
    e.addComponent(new Health(110, 150));
    e.addComponent(new Ammo(78, 150));

    Body b = new Body(new Box(125, 104), 1f);
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.