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); }
public void flip() { double vx = cmc.getVelocityX(); vx = -vx; cmc.setVelocityX(vx); }