1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 18:07:25 +08:00
osu-lazer/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs

53 lines
1.6 KiB
C#
Raw Normal View History

2017-05-03 14:50:42 +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
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
public abstract class DrawableManiaHitObject<TObject> : DrawableHitObject<ManiaHitObject, ManiaJudgement>
where TObject : ManiaHitObject
{
public override Color4 AccentColour
{
get { return base.AccentColour; }
set
{
base.AccentColour = value;
UpdateAccent();
}
}
public new TObject HitObject;
protected override Container<Drawable> Content => noteFlow;
private FlowContainer<Drawable> noteFlow;
public DrawableManiaHitObject(TObject hitObject)
: base(hitObject)
{
HitObject = hitObject;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
AddInternal(noteFlow = new FillFlowContainer<Drawable>
{
Name = "Main container",
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
});
}
protected override ManiaJudgement CreateJudgement() => new ManiaJudgement();
protected virtual void UpdateAccent() { }
}
}