예제 #1
0
 void reset() {
   // Reset some base states (used when recycling character instances).
   health = 100;
   dying = false;
   attacking = false;
   animated = true;
   requestedAnimation = APAAnimationState.Idle;
   shadowBlob.setAlpha(1.0);
 }
예제 #2
0
  public void fadeIn(double duration) {
    // Fade in the main sprite and blob shadow.
    SKAction fadeAction = SKAction.fadeIn(duration);

    setAlpha(0.0);
    runAction(fadeAction);

    shadowBlob.setAlpha(0.0);
    shadowBlob.runAction(fadeAction);
  }
예제 #3
0
  @Override
  public void setAlpha(double alpha) {
    super.setAlpha(alpha);

    shadowBlob.setAlpha(alpha);
  }