mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Scope drawable nested hits more closely to models
This commit is contained in:
parent
61c488cd5e
commit
091b08b507
@ -19,7 +19,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public class DrawableDrumRoll : DrawableTaikoStrongHitObject<DrumRoll>
|
||||
public class DrawableDrumRoll : DrawableTaikoStrongHitObject<DrumRoll, DrumRoll.StrongNestedHit>
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of rolling hits required to reach the dark/final colour.
|
||||
@ -154,7 +154,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
Content.X = DrawHeight / 2;
|
||||
}
|
||||
|
||||
protected override DrawableStrongNestedHit CreateStrongNestedHit(StrongNestedHitObject hitObject) => new StrongNestedHit(hitObject, this);
|
||||
protected override DrawableStrongNestedHit CreateStrongNestedHit(DrumRoll.StrongNestedHit hitObject) => new StrongNestedHit(hitObject, this);
|
||||
|
||||
private void updateColour()
|
||||
{
|
||||
@ -164,7 +164,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
private class StrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
public StrongNestedHit(StrongNestedHitObject nestedHit, DrawableDrumRoll drumRoll)
|
||||
public StrongNestedHit(DrumRoll.StrongNestedHit nestedHit, DrawableDrumRoll drumRoll)
|
||||
: base(nestedHit, drumRoll)
|
||||
{
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public class DrawableDrumRollTick : DrawableTaikoStrongHitObject<DrumRollTick>
|
||||
public class DrawableDrumRollTick : DrawableTaikoStrongHitObject<DrumRollTick, DrumRollTick.StrongNestedHit>
|
||||
{
|
||||
/// <summary>
|
||||
/// The hit type corresponding to the <see cref="TaikoAction"/> that the user pressed to hit this <see cref="DrawableDrumRollTick"/>.
|
||||
@ -61,11 +61,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
return UpdateResult(true);
|
||||
}
|
||||
|
||||
protected override DrawableStrongNestedHit CreateStrongNestedHit(StrongNestedHitObject hitObject) => new StrongNestedHit(hitObject, this);
|
||||
protected override DrawableStrongNestedHit CreateStrongNestedHit(DrumRollTick.StrongNestedHit hitObject) => new StrongNestedHit(hitObject, this);
|
||||
|
||||
private class StrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
public StrongNestedHit(StrongNestedHitObject nestedHit, DrawableDrumRollTick tick)
|
||||
public StrongNestedHit(DrumRollTick.StrongNestedHit nestedHit, DrawableDrumRollTick tick)
|
||||
: base(nestedHit, tick)
|
||||
{
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public class DrawableHit : DrawableTaikoStrongHitObject<Hit>
|
||||
public class DrawableHit : DrawableTaikoStrongHitObject<Hit, Hit.StrongNestedHit>
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of keys which can result in hits for this HitObject.
|
||||
@ -228,7 +228,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override DrawableStrongNestedHit CreateStrongNestedHit(StrongNestedHitObject hitObject) => new StrongNestedHit(hitObject, this);
|
||||
protected override DrawableStrongNestedHit CreateStrongNestedHit(Hit.StrongNestedHit hitObject) => new StrongNestedHit(hitObject, this);
|
||||
|
||||
private class StrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
@ -240,7 +240,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
public new DrawableHit MainObject => (DrawableHit)base.MainObject;
|
||||
|
||||
public StrongNestedHit(StrongNestedHitObject nestedHit, DrawableHit hit)
|
||||
public StrongNestedHit(Hit.StrongNestedHit nestedHit, DrawableHit hit)
|
||||
: base(nestedHit, hit)
|
||||
{
|
||||
}
|
||||
|
@ -12,8 +12,9 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
public abstract class DrawableTaikoStrongHitObject<TObject> : DrawableTaikoHitObject<TObject>
|
||||
public abstract class DrawableTaikoStrongHitObject<TObject, TStrongNestedObject> : DrawableTaikoHitObject<TObject>
|
||||
where TObject : TaikoStrongHitObject
|
||||
where TStrongNestedObject : StrongNestedHitObject
|
||||
{
|
||||
private readonly Bindable<bool> isStrong;
|
||||
|
||||
@ -92,7 +93,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
{
|
||||
switch (hitObject)
|
||||
{
|
||||
case StrongNestedHitObject strong:
|
||||
case TStrongNestedObject strong:
|
||||
return CreateStrongNestedHit(strong);
|
||||
}
|
||||
|
||||
@ -105,6 +106,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The strong hitobject.</param>
|
||||
/// <returns>The strong hitobject handler.</returns>
|
||||
protected abstract DrawableStrongNestedHit CreateStrongNestedHit(StrongNestedHitObject hitObject);
|
||||
protected abstract DrawableStrongNestedHit CreateStrongNestedHit(TStrongNestedObject hitObject);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user