2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-03-21 15:40:37 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2017-03-21 15:33:25 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Game.Graphics;
|
2017-04-18 15:05:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
2017-07-15 00:18:12 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-12-31 04:23:18 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2017-03-21 15:33:25 +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
|
|
|
|
{
|
2017-03-21 17:16:14 +08:00
|
|
|
|
/// <summary>
|
2017-03-23 11:49:58 +08:00
|
|
|
|
/// Creates a new judgement text.
|
2017-03-21 17:16:14 +08:00
|
|
|
|
/// </summary>
|
2017-09-11 13:48:01 +08:00
|
|
|
|
/// <param name="judgedObject">The object which is being judged.</param>
|
2017-03-23 11:49:58 +08:00
|
|
|
|
/// <param name="judgement">The judgement to visualise.</param>
|
2018-03-07 18:14:42 +08:00
|
|
|
|
public DrawableTaikoJudgement(Judgement judgement, DrawableHitObject judgedObject)
|
|
|
|
|
: base(judgement, judgedObject)
|
2017-03-21 15:33:25 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
|
{
|
|
|
|
|
switch (Judgement.Result)
|
|
|
|
|
{
|
2017-09-05 18:44:59 +08:00
|
|
|
|
case HitResult.Good:
|
|
|
|
|
Colour = colours.GreenLight;
|
|
|
|
|
break;
|
|
|
|
|
case HitResult.Great:
|
|
|
|
|
Colour = colours.BlueLight;
|
2017-03-21 15:33:25 +08:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
2017-09-05 18:44:59 +08:00
|
|
|
|
if (Judgement.IsHit)
|
|
|
|
|
this.MoveToY(-100, 500);
|
2017-03-21 15:33:25 +08:00
|
|
|
|
|
2017-03-23 14:07:45 +08:00
|
|
|
|
base.LoadComplete();
|
2017-03-21 15:33:25 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-12-31 04:23:18 +08:00
|
|
|
|
}
|