/// <summary> /// Tints text while holding a key. /// </summary> /// <remarks> /// Does not alter combo. This has to be done depending of the scoring system. /// (i.e. v1 = each period of time; v2 = when starting and ending a key hold) /// </remarks> public void HoldStart() { if (KeysHeld == 0) { DisplayedCountSpriteText.FadeColour(TintColour, TintDuration, TintEasing); } KeysHeld++; }
/// <summary> /// Ends tinting. /// </summary> public void HoldEnd() { KeysHeld--; if (KeysHeld == 0) { DisplayedCountSpriteText.FadeColour(OriginalColour, TintDuration, TintEasing); } }
protected override void OnCountChange(ulong currentValue, ulong newValue) { ScheduledPopOutCurrentId++; if (newValue == 0) { DisplayedCountSpriteText.FadeOut(); } base.OnCountChange(currentValue, newValue); }
protected override void OnCountRolling(ulong currentValue, ulong newValue) { ScheduledPopOutCurrentId++; // Hides displayed count if was increasing from 0 to 1 but didn't finish if (currentValue == 0 && newValue == 0) { DisplayedCountSpriteText.FadeOut(FadeOutDuration); } base.OnCountRolling(currentValue, newValue); }
protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue) { if (newValue == 0) { DisplayedCountSpriteText.FadeOut(FadeOutDuration); } else { DisplayedCountSpriteText.Show(); } TransformNotAnimate(newValue); }
protected override void OnCountIncrement(ulong currentValue, ulong newValue) { ScheduledPopOutCurrentId++; if (DisplayedCount < currentValue) { DisplayedCount++; } DisplayedCountSpriteText.Show(); TransformPopOut(newValue); uint newTaskId = ScheduledPopOutCurrentId; Scheduler.AddDelayed(delegate { ScheduledPopOutSmall(newTaskId); }, PopOutDuration); }
protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue) { if (newValue == 0) { DisplayedCountSpriteText.FadeOut(FadeOutDuration); } else { DisplayedCountSpriteText.Show(); } if (CanPopOutWhileRolling) { TransformPopOutRolling(newValue); } else { TransformNoPopOut(newValue); } }
protected virtual void TransformPopOutSmall(ulong newValue) { DisplayedCountSpriteText.Text = FormatCount(newValue); DisplayedCountSpriteText.ScaleTo(PopOutSmallScale); DisplayedCountSpriteText.ScaleTo(1, PopOutDuration, PopOutEasing); }
protected virtual void TransformNoPopOut(ulong newValue) { DisplayedCountSpriteText.Text = FormatCount(newValue); DisplayedCountSpriteText.ScaleTo(1); }
protected override void OnDisplayedCountIncrement(ulong newValue) { DisplayedCountSpriteText.Show(); TransformPopOutSmall(newValue); }
protected override void OnDisplayedCountChange(ulong newValue) { DisplayedCountSpriteText.FadeTo(newValue == 0 ? 0 : 1); TransformNoPopOut(newValue); }
protected virtual void TransformAnimate(ulong newValue) { DisplayedCountSpriteText.Text = FormatCount(newValue); DisplayedCountSpriteText.ScaleTo(new Vector2(1, ScaleFactor)); DisplayedCountSpriteText.ScaleTo(new Vector2(1, 1), AnimationDuration, AnimationEasing); }