2017-03-21 07:40:37 +00: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 07:05:58 +00:00
|
|
|
|
using osu.Game.Rulesets.Taiko.Judgements;
|
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2017-03-21 07:33:25 +00:00
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Game.Graphics;
|
2017-04-18 07:05:58 +00:00
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
2017-03-21 07:33:25 +00:00
|
|
|
|
|
2017-04-18 07:05:58 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Taiko.UI
|
2017-03-21 07:33:25 +00:00
|
|
|
|
{
|
2017-03-21 09:16:14 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Text that is shown as judgement when a hit object is hit or missed.
|
|
|
|
|
/// </summary>
|
2017-03-23 10:00:18 +00:00
|
|
|
|
public class DrawableTaikoJudgement : DrawableJudgement<TaikoJudgement>
|
2017-03-21 07:33:25 +00:00
|
|
|
|
{
|
2017-03-21 09:16:14 +00:00
|
|
|
|
/// <summary>
|
2017-03-23 03:49:58 +00:00
|
|
|
|
/// Creates a new judgement text.
|
2017-03-21 09:16:14 +00:00
|
|
|
|
/// </summary>
|
2017-03-23 03:49:58 +00:00
|
|
|
|
/// <param name="judgement">The judgement to visualise.</param>
|
2017-03-23 10:00:18 +00:00
|
|
|
|
public DrawableTaikoJudgement(TaikoJudgement judgement)
|
2017-03-23 03:49:58 +00:00
|
|
|
|
: base(judgement)
|
2017-03-21 07:33:25 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
|
{
|
|
|
|
|
switch (Judgement.Result)
|
|
|
|
|
{
|
|
|
|
|
case HitResult.Hit:
|
2017-03-21 16:42:40 +00:00
|
|
|
|
switch (Judgement.TaikoResult)
|
2017-03-21 07:33:25 +00:00
|
|
|
|
{
|
2017-03-21 16:42:40 +00:00
|
|
|
|
case TaikoHitResult.Good:
|
2017-03-23 05:52:18 +00:00
|
|
|
|
Colour = colours.GreenLight;
|
2017-03-21 07:33:25 +00:00
|
|
|
|
break;
|
2017-03-21 16:42:40 +00:00
|
|
|
|
case TaikoHitResult.Great:
|
2017-03-23 05:52:18 +00:00
|
|
|
|
Colour = colours.BlueLight;
|
2017-03-21 07:33:25 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
2017-03-23 06:07:45 +00:00
|
|
|
|
switch (Judgement.Result)
|
2017-03-23 03:49:58 +00:00
|
|
|
|
{
|
2017-03-23 06:07:45 +00:00
|
|
|
|
case HitResult.Hit:
|
|
|
|
|
MoveToY(-100, 500);
|
|
|
|
|
break;
|
2017-03-23 03:49:58 +00:00
|
|
|
|
}
|
2017-03-21 07:33:25 +00:00
|
|
|
|
|
2017-03-23 06:07:45 +00:00
|
|
|
|
base.LoadComplete();
|
2017-03-21 07:33:25 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|