public AbstractAttackVector(
     RPGGame game, AbstractVectorAttack owner, double x, double y, double speedX, double speedY) {
   AbstractAttackVector.game = game;
   vectorSprite = loadVectorSprite();
   vectorSprite.setLocation(x, y);
   vectorSprite.setSpeed(speedX, speedY);
   owner.registerVectorSprite(vectorSprite);
 }
Esempio n. 2
0
  @Override
  public void update(long elapsedTime) {
    if (jumpTimer.isActive() && jumpTimer.action(elapsedTime)) {
      // incremental jump time has been used up
      jumpTimer.setActive(false);
    }

    if (attackCooldown.isActive() && attackCooldown.action(elapsedTime)) {
      // incremental jump time has been used up
      attackCooldown.setActive(false);
    }

    manageUserInput(elapsedTime);
    super.update(elapsedTime);
  }