2017-05-03 06:50:42 +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-09-10 19:34:30 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-05-03 06:50:42 +00:00
|
|
|
|
using OpenTK.Graphics;
|
|
|
|
|
using osu.Game.Rulesets.Mania.Judgements;
|
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|
|
|
|
{
|
2017-06-19 01:54:23 +00:00
|
|
|
|
public abstract class DrawableManiaHitObject<TObject> : DrawableScrollingHitObject<ManiaHitObject, ManiaJudgement>
|
2017-05-03 06:50:42 +00:00
|
|
|
|
where TObject : ManiaHitObject
|
|
|
|
|
{
|
2017-05-22 06:27:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The key that will trigger input for this hit object.
|
|
|
|
|
/// </summary>
|
2017-08-23 04:42:11 +00:00
|
|
|
|
protected ManiaAction Action { get; }
|
2017-05-22 06:27:38 +00:00
|
|
|
|
|
2017-05-03 06:50:42 +00:00
|
|
|
|
public new TObject HitObject;
|
|
|
|
|
|
2017-08-23 04:42:11 +00:00
|
|
|
|
protected DrawableManiaHitObject(TObject hitObject, ManiaAction? action = null)
|
2017-05-03 06:50:42 +00:00
|
|
|
|
: base(hitObject)
|
|
|
|
|
{
|
2017-09-10 19:34:30 +00:00
|
|
|
|
RelativePositionAxes = Axes.Y;
|
2017-05-03 06:50:42 +00:00
|
|
|
|
HitObject = hitObject;
|
|
|
|
|
|
2017-08-23 04:42:11 +00:00
|
|
|
|
if (action != null)
|
|
|
|
|
Action = action.Value;
|
2017-05-03 06:50:42 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-05-04 09:02:43 +00:00
|
|
|
|
public override Color4 AccentColour
|
|
|
|
|
{
|
|
|
|
|
get { return base.AccentColour; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (base.AccentColour == value)
|
|
|
|
|
return;
|
|
|
|
|
base.AccentColour = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override ManiaJudgement CreateJudgement() => new ManiaJudgement();
|
2017-05-03 06:50:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|