Replace "end glow" terminology with "hyper-dash after-image"

Because the is "end glow" is when a hyper-dash is *started*, the name was confusing.
The "after-image" was already used in the code as a synonym of "end glow" inconsistently.
This commit is contained in:
ekrctb 2021-07-28 19:02:24 +09:00
parent 2b107d624a
commit a960a28d06
4 changed files with 18 additions and 19 deletions

View File

@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Catch.Tests
} }
[Test] [Test]
public void TestCustomEndGlowColour() public void TestCustomAfterImageColour()
{ {
var skin = new TestSkin var skin = new TestSkin
{ {
@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Catch.Tests
} }
[Test] [Test]
public void TestCustomEndGlowColourPriority() public void TestCustomAfterImageColourPriority()
{ {
var skin = new TestSkin var skin = new TestSkin
{ {
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Catch.Tests
checkHyperDashFruitColour(skin, skin.HyperDashColour); checkHyperDashFruitColour(skin, skin.HyperDashColour);
} }
private void checkHyperDashCatcherColour(ISkin skin, Color4 expectedCatcherColour, Color4? expectedEndGlowColour = null) private void checkHyperDashCatcherColour(ISkin skin, Color4 expectedCatcherColour, Color4? expectedAfterImageColour = null)
{ {
CatcherTrailDisplay trails = null; CatcherTrailDisplay trails = null;
Catcher catcher = null; Catcher catcher = null;
@ -141,7 +141,7 @@ namespace osu.Game.Rulesets.Catch.Tests
AddUntilStep("catcher colour is correct", () => catcher.Colour == expectedCatcherColour); AddUntilStep("catcher colour is correct", () => catcher.Colour == expectedCatcherColour);
AddAssert("catcher trails colours are correct", () => trails.HyperDashTrailsColour == expectedCatcherColour); AddAssert("catcher trails colours are correct", () => trails.HyperDashTrailsColour == expectedCatcherColour);
AddAssert("catcher end-glow colours are correct", () => trails.EndGlowSpritesColour == (expectedEndGlowColour ?? expectedCatcherColour)); AddAssert("catcher after-image colours are correct", () => trails.HyperDashAfterImageColour == (expectedAfterImageColour ?? expectedCatcherColour));
AddStep("finish hyper-dashing", () => AddStep("finish hyper-dashing", () =>
{ {

View File

@ -36,8 +36,7 @@ namespace osu.Game.Rulesets.Catch.UI
public const float ALLOWED_CATCH_RANGE = 0.8f; public const float ALLOWED_CATCH_RANGE = 0.8f;
/// <summary> /// <summary>
/// The default colour used to tint hyper-dash fruit, along with the moving catcher, its trail /// The default colour used to tint hyper-dash fruit, along with the moving catcher, its trail and after-image during a hyper-dash.
/// and end glow/after-image during a hyper-dash.
/// </summary> /// </summary>
public static readonly Color4 DEFAULT_HYPER_DASH_COLOUR = Color4.Red; public static readonly Color4 DEFAULT_HYPER_DASH_COLOUR = Color4.Red;

View File

@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Catch.UI
comboDisplay.X = Catcher.X; comboDisplay.X = Catcher.X;
if (!lastHyperDashState && Catcher.HyperDashing && Time.Elapsed > 0) if (!lastHyperDashState && Catcher.HyperDashing && Time.Elapsed > 0)
catcherTrails.DisplayEndGlow(Catcher.CurrentState, Catcher.X, Catcher.BodyScale); catcherTrails.DisplayHyperDashAfterImage(Catcher.CurrentState, Catcher.X, Catcher.BodyScale);
if (Catcher.Dashing || Catcher.HyperDashing) if (Catcher.Dashing || Catcher.HyperDashing)
{ {

View File

@ -27,13 +27,13 @@ namespace osu.Game.Rulesets.Catch.UI
public Color4 HyperDashTrailsColour => hyperDashTrails.Colour; public Color4 HyperDashTrailsColour => hyperDashTrails.Colour;
public Color4 EndGlowSpritesColour => endGlowSprites.Colour; public Color4 HyperDashAfterImageColour => hyperDashAfterImages.Colour;
private readonly DrawablePool<CatcherTrail> trailPool; private readonly DrawablePool<CatcherTrail> trailPool;
private readonly Container<CatcherTrail> dashTrails; private readonly Container<CatcherTrail> dashTrails;
private readonly Container<CatcherTrail> hyperDashTrails; private readonly Container<CatcherTrail> hyperDashTrails;
private readonly Container<CatcherTrail> endGlowSprites; private readonly Container<CatcherTrail> hyperDashAfterImages;
public CatcherTrailDisplay() public CatcherTrailDisplay()
{ {
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Catch.UI
trailPool = new DrawablePool<CatcherTrail>(30), trailPool = new DrawablePool<CatcherTrail>(30),
dashTrails = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both }, dashTrails = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both },
hyperDashTrails = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both, Colour = Catcher.DEFAULT_HYPER_DASH_COLOUR }, hyperDashTrails = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both, Colour = Catcher.DEFAULT_HYPER_DASH_COLOUR },
endGlowSprites = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both, Colour = Catcher.DEFAULT_HYPER_DASH_COLOUR }, hyperDashAfterImages = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both, Colour = Catcher.DEFAULT_HYPER_DASH_COLOUR },
}; };
} }
@ -53,22 +53,22 @@ namespace osu.Game.Rulesets.Catch.UI
base.SkinChanged(skin); base.SkinChanged(skin);
hyperDashTrails.Colour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash)?.Value ?? Catcher.DEFAULT_HYPER_DASH_COLOUR; hyperDashTrails.Colour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash)?.Value ?? Catcher.DEFAULT_HYPER_DASH_COLOUR;
endGlowSprites.Colour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashAfterImage)?.Value ?? hyperDashTrails.Colour; hyperDashAfterImages.Colour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashAfterImage)?.Value ?? hyperDashTrails.Colour;
} }
/// <summary> /// <summary>
/// Displays a single end-glow catcher sprite. /// Displays a hyper-dash after-image of the catcher.
/// </summary> /// </summary>
public void DisplayEndGlow(CatcherAnimationState animationState, float x, Vector2 scale) public void DisplayHyperDashAfterImage(CatcherAnimationState animationState, float x, Vector2 scale)
{ {
var endGlow = createTrail(animationState, x, scale); var trail = createTrail(animationState, x, scale);
endGlowSprites.Add(endGlow); hyperDashAfterImages.Add(trail);
endGlow.MoveToOffset(new Vector2(0, -10), 1200, Easing.In); trail.MoveToOffset(new Vector2(0, -10), 1200, Easing.In);
endGlow.ScaleTo(endGlow.Scale * 0.95f).ScaleTo(endGlow.Scale * 1.2f, 1200, Easing.In); trail.ScaleTo(trail.Scale * 0.95f).ScaleTo(trail.Scale * 1.2f, 1200, Easing.In);
endGlow.FadeOut(1200); trail.FadeOut(1200);
endGlow.Expire(true); trail.Expire(true);
} }
public void DisplayDashTrail(CatcherAnimationState animationState, float x, Vector2 scale, bool hyperDashing) public void DisplayDashTrail(CatcherAnimationState animationState, float x, Vector2 scale, bool hyperDashing)