diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs index f4b2afee08..a3560e7400 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs @@ -1,20 +1,20 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using osu.Framework.Screens.Testing; +using OpenTK; +using OpenTK.Graphics; using osu.Framework.Graphics; +using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Sprites; using osu.Framework.MathUtils; +using osu.Framework.Screens.Testing; using osu.Game.Graphics.UserInterface; using osu.Game.Modes.Catch.UI; using osu.Game.Modes.Mania.UI; using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Taiko.UI; using osu.Game.Modes.UI; -using OpenTK; -using OpenTK.Graphics; -using osu.Framework.Graphics.Primitives; +using System; namespace osu.Desktop.VisualTests.Tests { @@ -50,36 +50,6 @@ namespace osu.Desktop.VisualTests.Tests }; Add(standardCombo); - CatchComboCounter catchCombo = new CatchComboCounter - { - Origin = Anchor.Centre, - Anchor = Anchor.Centre, - Count = 0, - TextSize = 40, - }; - Add(catchCombo); - - ComboCounter taikoCombo = new TaikoComboCounter - { - Origin = Anchor.BottomCentre, - Anchor = Anchor.Centre, - Position = new Vector2(0, -160), - Count = 0, - TextSize = 40, - }; - Add(taikoCombo); - - ManiaComboCounter maniaCombo = new ManiaComboCounter - { - Origin = Anchor.Centre, - Anchor = Anchor.Centre, - Position = new Vector2(0, -80), - Count = 0, - TextSize = 40, - }; - Add(maniaCombo); - - PercentageCounter accuracyCombo = new PercentageCounter { Origin = Anchor.TopRight, @@ -110,9 +80,6 @@ namespace osu.Desktop.VisualTests.Tests { score.Count = 0; standardCombo.Count = 0; - taikoCombo.Count = 0; - maniaCombo.Count = 0; - catchCombo.Count = 0; numerator = denominator = 0; accuracyCombo.SetFraction(0, 0); stars.Count = 0; @@ -123,14 +90,6 @@ namespace osu.Desktop.VisualTests.Tests { score.Count += 300 + (ulong)(300.0 * (standardCombo.Count > 0 ? standardCombo.Count - 1 : 0) / 25.0); standardCombo.Count++; - taikoCombo.Count++; - maniaCombo.Count++; - catchCombo.CatchFruit(new Color4( - Math.Max(0.5f, RNG.NextSingle()), - Math.Max(0.5f, RNG.NextSingle()), - Math.Max(0.5f, RNG.NextSingle()), - 1) - ); numerator++; denominator++; accuracyCombo.SetFraction(numerator, denominator); }); @@ -138,22 +97,10 @@ namespace osu.Desktop.VisualTests.Tests AddButton(@"miss...", delegate { standardCombo.Roll(); - taikoCombo.Roll(); - maniaCombo.Roll(); - catchCombo.Roll(); denominator++; accuracyCombo.SetFraction(numerator, denominator); }); - AddButton(@"mania hold", delegate - { - if (!maniaHold) - maniaCombo.HoldStart(); - else - maniaCombo.HoldEnd(); - maniaHold = !maniaHold; - }); - AddButton(@"Alter stars", delegate { stars.Count = RNG.NextSingle() * (stars.StarCount + 1); @@ -164,9 +111,6 @@ namespace osu.Desktop.VisualTests.Tests { score.StopRolling(); standardCombo.StopRolling(); - catchCombo.StopRolling(); - taikoCombo.StopRolling(); - maniaCombo.StopRolling(); accuracyCombo.StopRolling(); stars.StopAnimation(); }); diff --git a/osu.Game.Modes.Catch/UI/CatchComboCounter.cs b/osu.Game.Modes.Catch/UI/CatchComboCounter.cs deleted file mode 100644 index e0a07dc295..0000000000 --- a/osu.Game.Modes.Catch/UI/CatchComboCounter.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Modes.Osu.UI; -using OpenTK.Graphics; - -namespace osu.Game.Modes.Catch.UI -{ - /// - /// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch. - /// - public class CatchComboCounter : OsuComboCounter - { - protected override bool CanPopOutWhileRolling => true; - - protected virtual double FadeOutDelay => 1000; - protected override double FadeOutDuration => 300; - - protected override string FormatCount(ulong count) - { - return $@"{count:#,0}"; - } - - private void animateFade() - { - Show(); - Delay(FadeOutDelay); - FadeOut(FadeOutDuration); - DelayReset(); - } - - protected override void OnCountChange(ulong currentValue, ulong newValue) - { - if (newValue != 0) - animateFade(); - base.OnCountChange(currentValue, newValue); - } - - protected override void OnCountRolling(ulong currentValue, ulong newValue) - { - if (!IsRolling) - { - PopOutCount.Colour = DisplayedCountSpriteText.Colour; - FadeOut(FadeOutDuration); - } - base.OnCountRolling(currentValue, newValue); - } - - protected override void OnCountIncrement(ulong currentValue, ulong newValue) - { - animateFade(); - base.OnCountIncrement(currentValue, newValue); - } - - /// - /// Increaces counter and tints pop-out before animation. - /// - /// Last grabbed fruit colour. - public void CatchFruit(Color4 colour) - { - PopOutCount.Colour = colour; - Count++; - } - } -} diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index 42f06608b9..663d12bb4d 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -54,7 +54,6 @@ - diff --git a/osu.Game.Modes.Mania/UI/ManiaComboCounter.cs b/osu.Game.Modes.Mania/UI/ManiaComboCounter.cs deleted file mode 100644 index c5ed557854..0000000000 --- a/osu.Game.Modes.Mania/UI/ManiaComboCounter.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Framework.Graphics.Transforms; -using osu.Game.Modes.Taiko.UI; -using OpenTK.Graphics; - -namespace osu.Game.Modes.Mania.UI -{ - /// - /// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania. - /// - public class ManiaComboCounter : TaikoComboCounter - { - protected ushort KeysHeld; - - protected Color4 OriginalColour; - - protected Color4 TintColour => Color4.Orange; - protected EasingTypes TintEasing => EasingTypes.None; - protected int TintDuration => 500; - - protected Color4 PopOutColor => Color4.Red; - protected override float PopOutInitialAlpha => 1.0f; - protected override double PopOutDuration => 300; - - protected override void LoadComplete() - { - base.LoadComplete(); - - PopOutCount.Anchor = Anchor.BottomCentre; - PopOutCount.Origin = Anchor.Centre; - PopOutCount.FadeColour(PopOutColor); - OriginalColour = DisplayedCountSpriteText.Colour; - } - - protected override void OnCountRolling(ulong currentValue, ulong newValue) - { - if (!IsRolling && newValue < currentValue) - { - PopOutCount.Text = FormatCount(currentValue); - - PopOutCount.FadeTo(PopOutInitialAlpha); - PopOutCount.ScaleTo(1.0f); - - PopOutCount.FadeOut(PopOutDuration, PopOutEasing); - PopOutCount.ScaleTo(PopOutScale, PopOutDuration, PopOutEasing); - } - - base.OnCountRolling(currentValue, newValue); - } - - /// - /// Tints text while holding a key. - /// - /// - /// 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) - /// - public void HoldStart() - { - if (KeysHeld == 0) - DisplayedCountSpriteText.FadeColour(TintColour, TintDuration, TintEasing); - KeysHeld++; - } - - /// - /// Ends tinting. - /// - public void HoldEnd() - { - KeysHeld--; - if (KeysHeld == 0) - DisplayedCountSpriteText.FadeColour(OriginalColour, TintDuration, TintEasing); - } - } -} diff --git a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj index 457fb38e00..354f0b8541 100644 --- a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj +++ b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj @@ -54,7 +54,6 @@ - diff --git a/osu.Game.Modes.Taiko/TaikoRuleset.cs b/osu.Game.Modes.Taiko/TaikoRuleset.cs index fad60a98b5..585b3e97b0 100644 --- a/osu.Game.Modes.Taiko/TaikoRuleset.cs +++ b/osu.Game.Modes.Taiko/TaikoRuleset.cs @@ -1,13 +1,13 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Collections.Generic; +using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Modes.Objects; using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Taiko.UI; using osu.Game.Modes.UI; -using osu.Game.Beatmaps; +using System.Collections.Generic; namespace osu.Game.Modes.Taiko { diff --git a/osu.Game.Modes.Taiko/UI/TaikoComboCounter.cs b/osu.Game.Modes.Taiko/UI/TaikoComboCounter.cs deleted file mode 100644 index 44afa85989..0000000000 --- a/osu.Game.Modes.Taiko/UI/TaikoComboCounter.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics.Transforms; -using osu.Game.Modes.UI; -using OpenTK; - -namespace osu.Game.Modes.Taiko.UI -{ - /// - /// Allows tint and scaling animations. Used in osu!taiko. - /// - public class TaikoComboCounter : ComboCounter - { - protected virtual int AnimationDuration => 300; - protected virtual float ScaleFactor => 2; - protected virtual EasingTypes AnimationEasing => EasingTypes.None; - protected virtual bool CanAnimateWhenBackwards => false; - - public TaikoComboCounter() - { - DisplayedCountSpriteText.Origin = Framework.Graphics.Anchor.BottomCentre; - DisplayedCountSpriteText.Anchor = Framework.Graphics.Anchor.BottomCentre; - } - - protected virtual void TransformAnimate(ulong newValue) - { - DisplayedCountSpriteText.Text = FormatCount(newValue); - DisplayedCountSpriteText.ScaleTo(new Vector2(1, ScaleFactor)); - DisplayedCountSpriteText.ScaleTo(new Vector2(1, 1), AnimationDuration, AnimationEasing); - } - - protected virtual void TransformNotAnimate(ulong newValue) - { - DisplayedCountSpriteText.Text = FormatCount(newValue); - DisplayedCountSpriteText.ScaleTo(1); - } - - protected override void OnDisplayedCountRolling(ulong currentValue, ulong newValue) - { - if (newValue == 0) - DisplayedCountSpriteText.FadeOut(FadeOutDuration); - else - DisplayedCountSpriteText.Show(); - - TransformNotAnimate(newValue); - } - - protected override void OnDisplayedCountChange(ulong newValue) - { - DisplayedCountSpriteText.FadeTo(newValue == 0 ? 0 : 1); - - TransformNotAnimate(newValue); - } - - protected override void OnDisplayedCountIncrement(ulong newValue) - { - DisplayedCountSpriteText.Show(); - - TransformAnimate(newValue); - } - } -} diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 6c379b1b70..35f5a2d686 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -52,7 +52,6 @@ -