1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:43:10 +08:00

Add parent hitobject to strong hits

This commit is contained in:
Dan Balasescu 2023-05-09 19:30:54 +09:00
parent e69152fd14
commit 5afe57033d
4 changed files with 23 additions and 3 deletions

View File

@ -109,12 +109,17 @@ namespace osu.Game.Rulesets.Taiko.Objects
protected override HitWindows CreateHitWindows() => HitWindows.Empty; protected override HitWindows CreateHitWindows() => HitWindows.Empty;
protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit { StartTime = startTime }; protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit(this) { StartTime = startTime };
public class StrongNestedHit : StrongNestedHitObject public class StrongNestedHit : StrongNestedHitObject
{ {
// The strong hit of the drum roll doesn't actually provide any score. // The strong hit of the drum roll doesn't actually provide any score.
public override Judgement CreateJudgement() => new IgnoreJudgement(); public override Judgement CreateJudgement() => new IgnoreJudgement();
public StrongNestedHit(TaikoHitObject parent)
: base(parent)
{
}
} }
#region LegacyBeatmapEncoder #region LegacyBeatmapEncoder

View File

@ -33,10 +33,14 @@ namespace osu.Game.Rulesets.Taiko.Objects
public override double MaximumJudgementOffset => HitWindow; public override double MaximumJudgementOffset => HitWindow;
protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit { StartTime = startTime }; protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit(this) { StartTime = startTime };
public class StrongNestedHit : StrongNestedHitObject public class StrongNestedHit : StrongNestedHitObject
{
public StrongNestedHit(TaikoHitObject parent)
: base(parent)
{ {
} }
} }
} }
}

View File

@ -72,10 +72,14 @@ namespace osu.Game.Rulesets.Taiko.Objects
} }
} }
protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit { StartTime = startTime }; protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit(this) { StartTime = startTime };
public class StrongNestedHit : StrongNestedHitObject public class StrongNestedHit : StrongNestedHitObject
{
public StrongNestedHit(TaikoHitObject parent)
: base(parent)
{ {
} }
} }
} }
}

View File

@ -15,6 +15,13 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// </summary> /// </summary>
public abstract class StrongNestedHitObject : TaikoHitObject public abstract class StrongNestedHitObject : TaikoHitObject
{ {
public readonly TaikoHitObject Parent;
protected StrongNestedHitObject(TaikoHitObject parent)
{
Parent = parent;
}
public override Judgement CreateJudgement() => new TaikoStrongJudgement(); public override Judgement CreateJudgement() => new TaikoStrongJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty; protected override HitWindows CreateHitWindows() => HitWindows.Empty;