1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 10:57:27 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/UI/DrawableTaikoJudgement.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
2018-04-13 17:19:50 +08:00
2017-04-18 15:05:58 +08:00
namespace osu.Game.Rulesets.Taiko.UI
2017-03-21 15:33:25 +08:00
{
2017-03-21 17:16:14 +08:00
/// <summary>
/// Text that is shown as judgement when a hit object is hit or missed.
/// </summary>
2017-09-06 17:05:51 +08:00
public class DrawableTaikoJudgement : DrawableJudgement
2017-03-21 15:33:25 +08:00
{
protected override void ApplyHitAnimations()
2017-03-21 15:33:25 +08:00
{
this.MoveToY(-100, 500);
base.ApplyHitAnimations();
2017-03-21 15:33:25 +08:00
}
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();
}
}
2017-03-21 15:33:25 +08:00
}
}