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