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

Make Catcher.body private as it is no longer needed by CatcherTrailDisplay

This commit is contained in:
ekrctb 2021-07-26 17:50:52 +09:00
parent c08130398c
commit 4282442278

View File

@ -88,8 +88,8 @@ namespace osu.Game.Rulesets.Catch.UI
public CatcherAnimationState CurrentState public CatcherAnimationState CurrentState
{ {
get => Body.AnimationState.Value; get => body.AnimationState.Value;
private set => Body.AnimationState.Value = value; private set => body.AnimationState.Value = value;
} }
/// <summary> /// <summary>
@ -112,7 +112,7 @@ namespace osu.Game.Rulesets.Catch.UI
/// </summary> /// </summary>
private readonly float catchWidth; private readonly float catchWidth;
internal readonly SkinnableCatcher Body; private readonly SkinnableCatcher body;
private Color4 hyperDashColour = DEFAULT_HYPER_DASH_COLOUR; private Color4 hyperDashColour = DEFAULT_HYPER_DASH_COLOUR;
private Color4 hyperDashEndGlowColour = DEFAULT_HYPER_DASH_COLOUR; private Color4 hyperDashEndGlowColour = DEFAULT_HYPER_DASH_COLOUR;
@ -154,7 +154,7 @@ namespace osu.Game.Rulesets.Catch.UI
// offset fruit vertically to better place "above" the plate. // offset fruit vertically to better place "above" the plate.
Y = -5 Y = -5
}, },
Body = new SkinnableCatcher(), body = new SkinnableCatcher(),
hitExplosionContainer = new HitExplosionContainer hitExplosionContainer = new HitExplosionContainer
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
@ -294,7 +294,7 @@ namespace osu.Game.Rulesets.Catch.UI
if (!wasHyperDashing) if (!wasHyperDashing)
{ {
trails.DisplayEndGlow(CurrentState, X, Scale * Body.Scale); trails.DisplayEndGlow(CurrentState, X, Scale * body.Scale);
runHyperDashStateTransition(true); runHyperDashStateTransition(true);
} }
} }
@ -340,7 +340,7 @@ namespace osu.Game.Rulesets.Catch.UI
base.Update(); base.Update();
var scaleFromDirection = new Vector2((int)VisualDirection, 1); var scaleFromDirection = new Vector2((int)VisualDirection, 1);
Body.Scale = scaleFromDirection; body.Scale = scaleFromDirection;
caughtObjectContainer.Scale = hitExplosionContainer.Scale = flipCatcherPlate ? scaleFromDirection : Vector2.One; caughtObjectContainer.Scale = hitExplosionContainer.Scale = flipCatcherPlate ? scaleFromDirection : Vector2.One;
// Correct overshooting. // Correct overshooting.
@ -357,7 +357,7 @@ namespace osu.Game.Rulesets.Catch.UI
double generationInterval = HyperDashing ? 25 : 50; double generationInterval = HyperDashing ? 25 : 50;
if (Time.Current - lastTrailTime >= generationInterval) if (Time.Current - lastTrailTime >= generationInterval)
trails.DisplayDashTrail(CurrentState, X, Scale * Body.Scale, HyperDashing); trails.DisplayDashTrail(CurrentState, X, Scale * body.Scale, HyperDashing);
} }
} }