public static void FadeInAndOut(Sprite target, int duration, byte lowAlpha, byte highAlpha) { if (!target.am.fading) { if (target.alpha == lowAlpha) { target.am.StartFade(duration, target.alpha, highAlpha); } else { target.am.StartFade(duration, target.alpha, lowAlpha); } } }
public AnimationManager(Sprite target) { this.target = target; }