2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-05-03 14:50:42 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-01-10 18:17:43 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-05-03 14:50:42 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|
|
|
|
{
|
2018-01-04 17:50:17 +08:00
|
|
|
|
public abstract class DrawableManiaHitObject<TObject> : DrawableHitObject<ManiaHitObject>
|
2017-05-03 14:50:42 +08:00
|
|
|
|
where TObject : ManiaHitObject
|
|
|
|
|
{
|
2017-05-22 14:27:38 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The key that will trigger input for this hit object.
|
|
|
|
|
/// </summary>
|
2017-08-23 12:42:11 +08:00
|
|
|
|
protected ManiaAction Action { get; }
|
2017-05-22 14:27:38 +08:00
|
|
|
|
|
2017-05-03 14:50:42 +08:00
|
|
|
|
public new TObject HitObject;
|
|
|
|
|
|
2017-08-23 12:42:11 +08:00
|
|
|
|
protected DrawableManiaHitObject(TObject hitObject, ManiaAction? action = null)
|
2017-05-03 14:50:42 +08:00
|
|
|
|
: base(hitObject)
|
|
|
|
|
{
|
2018-01-10 18:17:43 +08:00
|
|
|
|
Anchor = Anchor.TopCentre;
|
|
|
|
|
Origin = Anchor.TopCentre;
|
|
|
|
|
|
2017-05-03 14:50:42 +08:00
|
|
|
|
HitObject = hitObject;
|
|
|
|
|
|
2017-08-23 12:42:11 +08:00
|
|
|
|
if (action != null)
|
|
|
|
|
Action = action.Value;
|
2017-05-03 14:50:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|