1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 05:32:54 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/UI/DrawableTaikoJudgement.cs

51 lines
1.5 KiB
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
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>
/// <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)
{
switch (Result.Type)
2018-04-13 17:19:50 +08:00
{
case HitResult.Good:
JudgementBody.Colour = colours.GreenLight;
2018-04-13 17:19:50 +08:00
break;
case HitResult.Great:
JudgementBody.Colour = colours.BlueLight;
2018-04-13 17:19:50 +08:00
break;
}
}
protected override void LoadComplete()
{
if (Result.IsHit)
2018-04-13 17:19:50 +08:00
this.MoveToY(-100, 500);
base.LoadComplete();
}
}
}