mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Abstract class + move AccentColour to base.
This commit is contained in:
@ -1,21 +1,15 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Modes.Objects.Drawables;
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
using osu.Game.Modes.Taiko.Judgements;
|
using osu.Game.Modes.Taiko.Judgements;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
{
|
{
|
||||||
public class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject, TaikoJudgementInfo>
|
public abstract class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject, TaikoJudgementInfo>
|
||||||
{
|
{
|
||||||
/// <summary>
|
protected DrawableTaikoHitObject(TaikoHitObject hitObject)
|
||||||
/// The colour used for various elements of this DrawableHitObject.
|
|
||||||
/// </summary>
|
|
||||||
public virtual Color4 AccentColour { get; }
|
|
||||||
|
|
||||||
public DrawableTaikoHitObject(TaikoHitObject hitObject)
|
|
||||||
: base(hitObject)
|
: base(hitObject)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft;
|
Anchor = Anchor.CentreLeft;
|
||||||
@ -25,17 +19,10 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
|
|
||||||
LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2;
|
LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2;
|
||||||
LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt;
|
LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt;
|
||||||
|
|
||||||
// Todo: Remove (suppresses Resharper)
|
|
||||||
AccentColour = Color4.White;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override TaikoJudgementInfo CreateJudgementInfo() => new TaikoJudgementInfo();
|
protected override TaikoJudgementInfo CreateJudgementInfo() => new TaikoJudgementInfo();
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the scroll position of the DrawableHitObject relative to the offset between
|
/// Sets the scroll position of the DrawableHitObject relative to the offset between
|
||||||
/// a time value and the HitObject's StartTime.
|
/// a time value and the HitObject's StartTime.
|
||||||
|
@ -11,6 +11,7 @@ using osu.Game.Beatmaps.Samples;
|
|||||||
using osu.Game.Modes.Judgements;
|
using osu.Game.Modes.Judgements;
|
||||||
using Container = osu.Framework.Graphics.Containers.Container;
|
using Container = osu.Framework.Graphics.Containers.Container;
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Objects.Drawables
|
namespace osu.Game.Modes.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -73,6 +74,11 @@ namespace osu.Game.Modes.Objects.Drawables
|
|||||||
|
|
||||||
public TObject HitObject;
|
public TObject HitObject;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The colour used for various elements of this DrawableHitObject.
|
||||||
|
/// </summary>
|
||||||
|
public Color4 AccentColour { get; protected set; }
|
||||||
|
|
||||||
protected DrawableHitObject(TObject hitObject)
|
protected DrawableHitObject(TObject hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
|
Reference in New Issue
Block a user