mirror of https://github.com/ppy/osu
Fix mania misses not correctly animating (temporary solution)
This commit is contained in:
parent
1fd582d333
commit
20bb64c627
|
@ -24,7 +24,10 @@ public TestSceneDrawableJudgement()
|
|||
if (hitWindows.IsHitResultAllowed(result))
|
||||
{
|
||||
AddStep("Show " + result.GetDescription(), () => SetContents(() =>
|
||||
new DrawableManiaJudgement(new JudgementResult(new HitObject(), new Judgement()) { Type = result }, null)
|
||||
new DrawableManiaJudgement(new JudgementResult(new HitObject
|
||||
{
|
||||
StartTime = Time.Current
|
||||
}, new Judgement()) { Type = result }, null)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
|
@ -19,6 +20,27 @@ public DrawableManiaJudgement()
|
|||
{
|
||||
}
|
||||
|
||||
protected override void ApplyMissAnimations()
|
||||
{
|
||||
if (!(JudgementBody.Drawable is DefaultManiaJudgementPiece))
|
||||
{
|
||||
// this is temporary logic until mania's skin transformer returns IAnimatableJudgements
|
||||
JudgementBody.ScaleTo(1.6f);
|
||||
JudgementBody.ScaleTo(1, 100, Easing.In);
|
||||
|
||||
JudgementBody.MoveTo(Vector2.Zero);
|
||||
JudgementBody.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
|
||||
|
||||
JudgementBody.RotateTo(0);
|
||||
JudgementBody.RotateTo(40, 800, Easing.InQuint);
|
||||
JudgementBody.FadeOutFromOne(800);
|
||||
|
||||
LifetimeEnd = JudgementBody.LatestTransformEndTime;
|
||||
}
|
||||
|
||||
base.ApplyMissAnimations();
|
||||
}
|
||||
|
||||
protected override void ApplyHitAnimations()
|
||||
{
|
||||
JudgementBody.ScaleTo(0.8f);
|
||||
|
@ -29,11 +51,11 @@ protected override void ApplyHitAnimations()
|
|||
.FadeOut(200);
|
||||
}
|
||||
|
||||
protected override Drawable CreateDefaultJudgement(HitResult result) => new ManiaJudgementPiece(result);
|
||||
protected override Drawable CreateDefaultJudgement(HitResult result) => new DefaultManiaJudgementPiece(result);
|
||||
|
||||
private class ManiaJudgementPiece : DefaultJudgementPiece
|
||||
private class DefaultManiaJudgementPiece : DefaultJudgementPiece
|
||||
{
|
||||
public ManiaJudgementPiece(HitResult result)
|
||||
public DefaultManiaJudgementPiece(HitResult result)
|
||||
: base(result)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue