2019-01-24 16:43:03 +08: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 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.UI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Text that is shown as judgement when a hit object is hit or missed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DrawableTaikoJudgement : DrawableJudgement
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new judgement text.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="judgedObject">The object which is being judged.</param>
|
2018-08-02 19:36:08 +08:00
|
|
|
|
/// <param name="result">The judgement to visualise.</param>
|
|
|
|
|
public DrawableTaikoJudgement(JudgementResult result, DrawableHitObject judgedObject)
|
|
|
|
|
: base(result, judgedObject)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
|
{
|
2018-08-02 19:36:08 +08:00
|
|
|
|
switch (Result.Type)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
case HitResult.Good:
|
2018-09-29 11:27:25 +08:00
|
|
|
|
JudgementBody.Colour = colours.GreenLight;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
break;
|
2019-04-01 11:44:46 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
case HitResult.Great:
|
2018-09-29 11:27:25 +08:00
|
|
|
|
JudgementBody.Colour = colours.BlueLight;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-12 18:52:44 +08:00
|
|
|
|
protected override void ApplyHitAnimations()
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-03-12 18:52:44 +08:00
|
|
|
|
this.MoveToY(-100, 500);
|
|
|
|
|
base.ApplyHitAnimations();
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|