Exemplo n.º 1
0
  /** Makes crud wait for the animation to play out. */
  public void watchAnimation() {
    // Decrement the number of remaining frames. And when we're out of remaining frames move on.
    if (frameCount > damagePoint) {
      attackerBarDone = attackerHealthBar.runFrame();
      defenderBarDone = defenderHealthBar.runFrame();
    }

    if (frameCount < animationLength) frameCount++;
    if (frameCount >= animationLength && attackerBarDone && defenderBarDone) controlState = 5;
  }