public void FlipIcon(Texture2D newIcon) { if (animFlipIcon != null || animPulseLoad.Active) { return; } bool stageOneComplete = false; animFlipIcon = GameService.Animation.Tween(0, this.BoxScale == SkillBoxSize.Normal ? BOX_DIMENSIONSATSCALE_NORMAL : BOX_DIMENSIONSATSCALE_SMALL, 150, AnimationService.EasingMethod.Linear); animFlipIcon.AnimationCompleted += delegate { if (!stageOneComplete) { stageOneComplete = true; this.Icon = newIcon; animFlipIcon.Reverse(); } else { GameService.Animation.RemoveAnim(animFlipIcon); animFlipIcon = null; this.BackgroundColor = Color.Black; Invalidate(); } }; this.BackgroundColor = Color.Black; animFlipIcon.Start(); }
public SkillBox() : base() { LoadStaticResources(); this.ZIndex = Screen.MENUUI_BASEINDEX; animPulseLoad = Animation.Tween(1, 7, 600, AnimationService.EasingMethod.Linear); Invalidate(); }