1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 09:37:42 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/UI/DrawableTaikoJudgement.cs

57 lines
1.7 KiB
C#
Raw Normal View History

2017-03-21 15:40:37 +08: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 15:05:58 +08:00
using osu.Game.Rulesets.Taiko.Judgements;
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-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>
public class DrawableTaikoJudgement : DrawableJudgement<TaikoJudgement>
2017-03-21 15:33:25 +08:00
{
2017-03-21 17:16:14 +08:00
/// <summary>
/// Creates a new judgement text.
2017-03-21 17:16:14 +08:00
/// </summary>
/// <param name="judgement">The judgement to visualise.</param>
public DrawableTaikoJudgement(TaikoJudgement judgement)
: base(judgement)
2017-03-21 15:33:25 +08:00
{
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
switch (Judgement.Result)
{
case HitResult.Hit:
2017-03-22 00:42:40 +08:00
switch (Judgement.TaikoResult)
2017-03-21 15:33:25 +08:00
{
2017-03-22 00:42:40 +08:00
case TaikoHitResult.Good:
Colour = colours.GreenLight;
2017-03-21 15:33:25 +08:00
break;
2017-03-22 00:42:40 +08:00
case TaikoHitResult.Great:
Colour = colours.BlueLight;
2017-03-21 15:33:25 +08:00
break;
}
break;
}
}
protected override void LoadComplete()
{
switch (Judgement.Result)
{
case HitResult.Hit:
MoveToY(-100, 500);
break;
}
2017-03-21 15:33:25 +08:00
base.LoadComplete();
2017-03-21 15:33:25 +08:00
}
}
}