Package com.tankz.components

Examples of com.tankz.components.Physics


  }

  private void handleBulletHittingTarget(Entity bullet, Entity target) {
    addDamageToTarget(target);
   
    Physics bp = bullet.getComponent(Physics.class);
    EntityFactory.createExplosion(world, bp.getX(), bp.getY());

    world.deleteEntity(bullet);
  }
View Full Code Here


    // b.setDensity(100);
    // b.setFriction(1.1f);
    // b.setDamping(0.002f);
    // b.setRestitution(0);

    e.addComponent(new Physics(b));

    e.addToWorld();

    return e;
  }
View Full Code Here

    b.setPosition(x, y);
    b.setDamping(0.1f);
    b.setRestitution(0);
    b.setRotDamping(10f);
    b.setFriction(100);
    e.addComponent(new Physics(b));

    e.addToWorld();

    return e;
  }
View Full Code Here

    b.setDamping(0.1f);
    b.setRestitution(0);
    b.setRotDamping(10f);
    b.setFriction(100);
    b.setRotation(angleDeg);
    e.addComponent(new Physics(b));

    e.addToWorld();

    return e;
  }
View Full Code Here

    b.setPosition(x, y);
    b.setDamping(0.1f);
    b.setRestitution(0);
    b.setRotDamping(50f);
    b.setFriction(100);
    e.addComponent(new Physics(b));

    return e;
  }
View Full Code Here

TOP

Related Classes of com.tankz.components.Physics

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.