1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Add constant for special colour of catcher on default skin

This commit is contained in:
Salman Ahmed 2020-04-21 05:59:37 +03:00
parent e17a44c99b
commit 9373520bca

View File

@ -25,6 +25,14 @@ namespace osu.Game.Rulesets.Catch.UI
{
public static readonly Color4 DEFAULT_HYPER_DASH_COLOUR = Color4.Red;
/// <summary>
/// The default colour used directly for <see cref="Catcher.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>
/// Whether we are hyper-dashing or not.
/// </summary>
@ -285,7 +293,13 @@ namespace osu.Game.Rulesets.Catch.UI
if (hyperDashing)
{
this.FadeColour(hyperDashColour == DefaultHyperDashColour ? Color4.OrangeRed : hyperDashColour, hyper_dash_transition_length, Easing.OutQuint);
// 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_length, Easing.OutQuint);
this.FadeTo(0.2f, hyper_dash_transition_length, Easing.OutQuint);
}
else