1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

Make Apply non-virtual

This commit is contained in:
Dean Herbert 2020-11-17 14:05:13 +09:00
parent dc38aeac43
commit 9dfa4249e0
2 changed files with 7 additions and 12 deletions

View File

@ -39,23 +39,18 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
}); });
} }
public override void Apply(JudgementResult result, DrawableHitObject judgedObject)
{
base.Apply(result, judgedObject);
if (judgedObject?.HitObject is OsuHitObject osuObject)
{
Position = osuObject.StackedPosition;
Scale = new Vector2(osuObject.Scale);
}
}
protected override void PrepareForUse() protected override void PrepareForUse()
{ {
base.PrepareForUse(); base.PrepareForUse();
Lighting.ResetAnimation(); Lighting.ResetAnimation();
Lighting.SetColourFrom(JudgedObject, Result); Lighting.SetColourFrom(JudgedObject, Result);
if (JudgedObject?.HitObject is OsuHitObject osuObject)
{
Position = osuObject.StackedPosition;
Scale = new Vector2(osuObject.Scale);
}
} }
private double fadeOutDelay; private double fadeOutDelay;

View File

@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Judgements
this.Delay(FadeOutDelay).FadeOut(400); this.Delay(FadeOutDelay).FadeOut(400);
} }
public virtual void Apply([NotNull] JudgementResult result, [CanBeNull] DrawableHitObject judgedObject) public void Apply([NotNull] JudgementResult result, [CanBeNull] DrawableHitObject judgedObject)
{ {
Result = result; Result = result;
JudgedObject = judgedObject; JudgedObject = judgedObject;