Esempio n. 1
0
 /// <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++;
 }
Esempio n. 2
0
 /// <summary>
 /// Ends tinting.
 /// </summary>
 public void HoldEnd()
 {
     KeysHeld--;
     if (KeysHeld == 0)
     {
         DisplayedCountSpriteText.FadeColour(OriginalColour, TintDuration, TintEasing);
     }
 }
Esempio n. 3
0
        protected override void OnCountChange(ulong currentValue, ulong newValue)
        {
            ScheduledPopOutCurrentId++;

            if (newValue == 0)
            {
                DisplayedCountSpriteText.FadeOut();
            }

            base.OnCountChange(currentValue, newValue);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue)
        {
            if (newValue == 0)
            {
                DisplayedCountSpriteText.FadeOut(FadeOutDuration);
            }
            else
            {
                DisplayedCountSpriteText.Show();
            }

            TransformNotAnimate(newValue);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue)
        {
            if (newValue == 0)
            {
                DisplayedCountSpriteText.FadeOut(FadeOutDuration);
            }
            else
            {
                DisplayedCountSpriteText.Show();
            }

            if (CanPopOutWhileRolling)
            {
                TransformPopOutRolling(newValue);
            }
            else
            {
                TransformNoPopOut(newValue);
            }
        }
Esempio n. 8
0
 protected virtual void TransformPopOutSmall(ulong newValue)
 {
     DisplayedCountSpriteText.Text = FormatCount(newValue);
     DisplayedCountSpriteText.ScaleTo(PopOutSmallScale);
     DisplayedCountSpriteText.ScaleTo(1, PopOutDuration, PopOutEasing);
 }
Esempio n. 9
0
 protected virtual void TransformNoPopOut(ulong newValue)
 {
     DisplayedCountSpriteText.Text = FormatCount(newValue);
     DisplayedCountSpriteText.ScaleTo(1);
 }
Esempio n. 10
0
        protected override void OnDisplayedCountIncrement(ulong newValue)
        {
            DisplayedCountSpriteText.Show();

            TransformPopOutSmall(newValue);
        }
Esempio n. 11
0
        protected override void OnDisplayedCountChange(ulong newValue)
        {
            DisplayedCountSpriteText.FadeTo(newValue == 0 ? 0 : 1);

            TransformNoPopOut(newValue);
        }
Esempio n. 12
0
 protected virtual void TransformAnimate(ulong newValue)
 {
     DisplayedCountSpriteText.Text = FormatCount(newValue);
     DisplayedCountSpriteText.ScaleTo(new Vector2(1, ScaleFactor));
     DisplayedCountSpriteText.ScaleTo(new Vector2(1, 1), AnimationDuration, AnimationEasing);
 }