mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Split out taiko DefaultJudgementPiece
and move animations across
This commit is contained in:
parent
cb6b9898c1
commit
8745c2f016
@ -0,0 +1,32 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Skinning.Default
|
||||
{
|
||||
public class DefaultJudgementPiece : Rulesets.Judgements.DefaultJudgementPiece
|
||||
{
|
||||
public DefaultJudgementPiece(HitResult result)
|
||||
: base(result)
|
||||
{
|
||||
}
|
||||
|
||||
public override void PlayAnimation()
|
||||
{
|
||||
if (Result != HitResult.Miss)
|
||||
{
|
||||
this
|
||||
.MoveToY(0)
|
||||
.MoveToY(-100, 500);
|
||||
|
||||
JudgementText
|
||||
.ScaleTo(0.9f)
|
||||
.ScaleTo(1, 500, Easing.OutElastic);
|
||||
}
|
||||
|
||||
base.PlayAnimation();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using DefaultJudgementPiece = osu.Game.Rulesets.Taiko.Skinning.Default.DefaultJudgementPiece;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
@ -12,31 +13,6 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
/// </summary>
|
||||
public class DrawableTaikoJudgement : DrawableJudgement
|
||||
{
|
||||
protected override void ApplyHitAnimations()
|
||||
{
|
||||
this.MoveToY(-100, 500);
|
||||
base.ApplyHitAnimations();
|
||||
}
|
||||
|
||||
protected override Drawable CreateDefaultJudgement(HitResult result) => new TaikoJudgementPiece(result);
|
||||
|
||||
private class TaikoJudgementPiece : DefaultJudgementPiece
|
||||
{
|
||||
public TaikoJudgementPiece(HitResult result)
|
||||
: base(result)
|
||||
{
|
||||
}
|
||||
|
||||
public override void PlayAnimation()
|
||||
{
|
||||
if (Result != HitResult.Miss)
|
||||
{
|
||||
JudgementText.ScaleTo(0.9f);
|
||||
JudgementText.ScaleTo(1, 500, Easing.OutElastic);
|
||||
}
|
||||
|
||||
base.PlayAnimation();
|
||||
}
|
||||
}
|
||||
protected override Drawable CreateDefaultJudgement(HitResult result) => new DefaultJudgementPiece(result);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user