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