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); }
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); }
@Override public void setAlpha(double alpha) { super.setAlpha(alpha); shadowBlob.setAlpha(alpha); }