Package com.tankz.components

Examples of com.tankz.components.Velocity


  }

  @Override
  protected void process(Entity e) {
    Transform t = transformMapper.get(e);
    Velocity velocity = velocityMapper.get(e);

    float r = t.getRotationAsRadians();
    float v = velocity.getVelocity();

    float xn = t.getX() + (TrigLUT.cos(r) * v * world.getDelta());
    float yn = t.getY() + (TrigLUT.sin(r) * v * world.getDelta());

    t.setLocation(xn, yn);
View Full Code Here


    if (player == null || !player.isActive())
      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

    if (player == null || !player.isActive())
      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

  public static Entity createMammothTank(World world, float x, float y) {
    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));
View Full Code Here

TOP

Related Classes of com.tankz.components.Velocity

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.