mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 08:03:52 +09:00
Split out taiko DefaultJudgementPiece
and move animations across
This commit is contained in:
@ -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.Framework.Graphics;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
using DefaultJudgementPiece = osu.Game.Rulesets.Taiko.Skinning.Default.DefaultJudgementPiece;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.UI
|
namespace osu.Game.Rulesets.Taiko.UI
|
||||||
{
|
{
|
||||||
@ -12,31 +13,6 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DrawableTaikoJudgement : DrawableJudgement
|
public class DrawableTaikoJudgement : DrawableJudgement
|
||||||
{
|
{
|
||||||
protected override void ApplyHitAnimations()
|
protected override Drawable CreateDefaultJudgement(HitResult result) => new DefaultJudgementPiece(result);
|
||||||
{
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user