Exemplo n.º 1
0
 public void fireBullet() {
   final Bullet b = createBullet();
   b.setRotation(this.getRotation());
   final ConstantMovementController c =
       ConstantMovementController.createPolar(getBulletSpeed(), getRotation());
   b.addController(c);
   snapAnchor(b);
   // b.moveAtAngle(getWidth() / 2 + 20, getRotation());
   this.addSibling(b);
 }
Exemplo n.º 2
0
 public void flip() {
   double vx = cmc.getVelocityX();
   vx = -vx;
   cmc.setVelocityX(vx);
 }