예제 #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);
 }
예제 #2
0
파일: PongPuck.java 프로젝트: pstorum/ani
 public void flip() {
   double vx = cmc.getVelocityX();
   vx = -vx;
   cmc.setVelocityX(vx);
 }