Remove special case for moving catcher sprite

This commit is contained in:
Bartłomiej Dach 2020-05-06 23:25:25 +02:00
parent 6376128bde
commit ed83ac188e
2 changed files with 2 additions and 27 deletions

View File

@ -128,17 +128,7 @@ private void checkHyperDashCatcherColour(ISkin skin, Color4 expectedCatcherColou
catcherArea.MovableCatcher.SetHyperDashState(2);
});
AddUntilStep("catcher colour is correct", () =>
{
var expected = expectedCatcherColour;
if (expected == Catcher.DEFAULT_HYPER_DASH_COLOUR)
// The expected colour for Catcher.Colour is another colour
// for the default skin, assert with that instead.
expected = Catcher.DEFAULT_CATCHER_HYPER_DASH_COLOUR;
return catcherArea.MovableCatcher.Colour == expected;
});
AddUntilStep("catcher colour is correct", () => catcherArea.MovableCatcher.Colour == expectedCatcherColour);
AddAssert("catcher trails colours are correct", () => trails.HyperDashTrailsColour == expectedCatcherColour);
AddAssert("catcher end-glow colours are correct", () => trails.EndGlowSpritesColour == (expectedEndGlowColour ?? expectedCatcherColour));

View File

@ -28,15 +28,6 @@ public class Catcher : SkinReloadableDrawable, IKeyBindingHandler<CatchAction>
/// </summary>
public static readonly Color4 DEFAULT_HYPER_DASH_COLOUR = Color4.Red;
/// <summary>
/// The default hyper-dash colour used directly for this
/// <see cref="Catcher"/>'s <see cref="Drawable.Colour"/>.
/// </summary>
/// <remarks>
/// This colour is only used when no skin overrides <see cref="CatchSkinColour.HyperDash"/>.
/// </remarks>
public static readonly Color4 DEFAULT_CATCHER_HYPER_DASH_COLOUR = Color4.OrangeRed;
/// <summary>
/// The duration between transitioning to hyper-dash state.
/// </summary>
@ -288,13 +279,7 @@ private void updateCatcherColour(bool hyperDashing)
{
if (hyperDashing)
{
// special behaviour for catcher colour if no skin overrides.
var catcherColour =
hyperDashColour == DEFAULT_HYPER_DASH_COLOUR
? DEFAULT_CATCHER_HYPER_DASH_COLOUR
: hyperDashColour;
this.FadeColour(catcherColour, HYPER_DASH_TRANSITION_DURATION, Easing.OutQuint);
this.FadeColour(hyperDashColour, HYPER_DASH_TRANSITION_DURATION, Easing.OutQuint);
this.FadeTo(0.2f, HYPER_DASH_TRANSITION_DURATION, Easing.OutQuint);
}
else