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 @@ public void TestCustomCatcherColour()
}
[Test]
public void TestCustomEndGlowColour()
public void TestCustomAfterImageColour()
{
var skin = new TestSkin
{
@ -58,7 +58,7 @@ public void TestCustomEndGlowColour()
}
[Test]
public void TestCustomEndGlowColourPriority()
public void TestCustomAfterImageColourPriority()
{
var skin = new TestSkin
{
@ -111,7 +111,7 @@ public void TestFruitColourFallback()
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;
Catcher catcher = null;
@ -141,7 +141,7 @@ private void checkHyperDashCatcherColour(ISkin skin, Color4 expectedCatcherColou
AddUntilStep("catcher colour is correct", () => catcher.Colour == 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", () =>
{

View File

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

View File

@ -110,7 +110,7 @@ protected override void UpdateAfterChildren()
comboDisplay.X = Catcher.X;
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)
{

View File

@ -27,13 +27,13 @@ public class CatcherTrailDisplay : SkinReloadableDrawable
public Color4 HyperDashTrailsColour => hyperDashTrails.Colour;
public Color4 EndGlowSpritesColour => endGlowSprites.Colour;
public Color4 HyperDashAfterImageColour => hyperDashAfterImages.Colour;
private readonly DrawablePool<CatcherTrail> trailPool;
private readonly Container<CatcherTrail> dashTrails;
private readonly Container<CatcherTrail> hyperDashTrails;
private readonly Container<CatcherTrail> endGlowSprites;
private readonly Container<CatcherTrail> hyperDashAfterImages;
public CatcherTrailDisplay()
{
@ -44,7 +44,7 @@ public CatcherTrailDisplay()
trailPool = new DrawablePool<CatcherTrail>(30),
dashTrails = new Container<CatcherTrail> { RelativeSizeAxes = Axes.Both },
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 @@ protected override void SkinChanged(ISkinSource skin)
base.SkinChanged(skin);
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>
/// Displays a single end-glow catcher sprite.
/// Displays a hyper-dash after-image of the catcher.
/// </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);
endGlow.ScaleTo(endGlow.Scale * 0.95f).ScaleTo(endGlow.Scale * 1.2f, 1200, Easing.In);
endGlow.FadeOut(1200);
endGlow.Expire(true);
trail.MoveToOffset(new Vector2(0, -10), 1200, Easing.In);
trail.ScaleTo(trail.Scale * 0.95f).ScaleTo(trail.Scale * 1.2f, 1200, Easing.In);
trail.FadeOut(1200);
trail.Expire(true);
}
public void DisplayDashTrail(CatcherAnimationState animationState, float x, Vector2 scale, bool hyperDashing)