mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 07:07:45 +08:00
Create HO-specific nested hit types
This commit is contained in:
parent
4d444df6b3
commit
61c488cd5e
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
||||
createDrawableRuleset();
|
||||
|
||||
assertStateAfterResult(new JudgementResult(new Hit(), new TaikoJudgement()) { Type = HitResult.Great }, TaikoMascotAnimationState.Idle);
|
||||
assertStateAfterResult(new JudgementResult(new StrongNestedHitObject(), new TaikoStrongJudgement()) { Type = HitResult.IgnoreMiss }, TaikoMascotAnimationState.Idle);
|
||||
assertStateAfterResult(new JudgementResult(new Hit.StrongNestedHit(), new TaikoStrongJudgement()) { Type = HitResult.IgnoreMiss }, TaikoMascotAnimationState.Idle);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -109,6 +109,12 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
|
||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||
|
||||
protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit { StartTime = startTime };
|
||||
|
||||
public class StrongNestedHit : StrongNestedHitObject
|
||||
{
|
||||
}
|
||||
|
||||
#region LegacyBeatmapEncoder
|
||||
|
||||
double IHasDistance.Distance => Duration * Velocity;
|
||||
|
@ -28,5 +28,11 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
public override Judgement CreateJudgement() => new TaikoDrumRollTickJudgement();
|
||||
|
||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||
|
||||
protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit { StartTime = startTime };
|
||||
|
||||
public class StrongNestedHit : StrongNestedHitObject
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,5 +17,11 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
get => TypeBindable.Value;
|
||||
set => TypeBindable.Value = value;
|
||||
}
|
||||
|
||||
protected override StrongNestedHitObject CreateStrongNestedHit(double startTime) => new StrongNestedHit { StartTime = startTime };
|
||||
|
||||
public class StrongNestedHit : StrongNestedHitObject
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ using osu.Game.Rulesets.Taiko.Judgements;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Objects
|
||||
{
|
||||
public class StrongNestedHitObject : TaikoHitObject
|
||||
public abstract class StrongNestedHitObject : TaikoHitObject
|
||||
{
|
||||
public override Judgement CreateJudgement() => new TaikoStrongJudgement();
|
||||
|
||||
|
@ -36,7 +36,14 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
base.CreateNestedHitObjects(cancellationToken);
|
||||
|
||||
if (IsStrong)
|
||||
AddNested(new StrongNestedHitObject { StartTime = this.GetEndTime() });
|
||||
AddNested(CreateStrongNestedHit(this.GetEndTime()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="StrongNestedHitObject"/> representing a second hit on this object.
|
||||
/// This is only called if <see cref="IsStrong"/> is true.
|
||||
/// </summary>
|
||||
/// <param name="startTime">The start time of the nested hit.</param>
|
||||
protected abstract StrongNestedHitObject CreateStrongNestedHit(double startTime);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user