mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
DrawableStrongHandler -> DrawableNestedStrongHit
This commit is contained in:
parent
7971d06df1
commit
732dfde8ed
@ -155,7 +155,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
var h = new DrawableTestHit(hit) { X = RNG.NextSingle(hitResult == HitResult.Good ? -0.1f : -0.05f, hitResult == HitResult.Good ? 0.1f : 0.05f) };
|
||||
|
||||
((TaikoPlayfield)rulesetContainer.Playfield).OnNewResult(h, new JudgementResult(new TaikoJudgement()) { Type = hitResult });
|
||||
((TaikoPlayfield)rulesetContainer.Playfield).OnNewResult(new TestStrongHandler(h), new JudgementResult(new TaikoStrongJudgement()) { Type = HitResult.Great });
|
||||
((TaikoPlayfield)rulesetContainer.Playfield).OnNewResult(new TestStrongNestedHit(h), new JudgementResult(new TaikoStrongJudgement()) { Type = HitResult.Great });
|
||||
}
|
||||
|
||||
private void addMissJudgement()
|
||||
@ -226,9 +226,9 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
rulesetContainer.Playfield.Add(new DrawableRimHit(h));
|
||||
}
|
||||
|
||||
private class TestStrongHandler : DrawableStrongHandler
|
||||
private class TestStrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
public TestStrongHandler(DrawableHitObject mainObject)
|
||||
public TestStrongNestedHit(DrawableHitObject mainObject)
|
||||
: base(null, mainObject)
|
||||
{
|
||||
}
|
||||
|
@ -99,11 +99,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override DrawableStrongHandler CreateStrongHandler(StrongHitObject hitObject) => new StrongHandler(hitObject, this);
|
||||
protected override DrawableStrongNestedHit CreateStrongHit(StrongHitObject hitObject) => new StrongNestedHit(hitObject, this);
|
||||
|
||||
private class StrongHandler : DrawableStrongHandler
|
||||
private class StrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
public StrongHandler(StrongHitObject strong, DrawableDrumRoll drumRoll)
|
||||
public StrongNestedHit(StrongHitObject strong, DrawableDrumRoll drumRoll)
|
||||
: base(strong, drumRoll)
|
||||
{
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
public override bool OnPressed(TaikoAction action) => UpdateResult(true);
|
||||
|
||||
protected override DrawableStrongHandler CreateStrongHandler(StrongHitObject hitObject) => new StrongHandler(hitObject, this);
|
||||
protected override DrawableStrongNestedHit CreateStrongHit(StrongHitObject hitObject) => new StrongNestedHit(hitObject, this);
|
||||
|
||||
private class StrongHandler : DrawableStrongHandler
|
||||
private class StrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
public StrongHandler(StrongHitObject strong, DrawableDrumRollTick tick)
|
||||
public StrongNestedHit(StrongHitObject strong, DrawableDrumRollTick tick)
|
||||
: base(strong, tick)
|
||||
{
|
||||
}
|
||||
|
@ -127,9 +127,9 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected override DrawableStrongHandler CreateStrongHandler(StrongHitObject hitObject) => new StrongHandler(hitObject, this);
|
||||
protected override DrawableStrongNestedHit CreateStrongHit(StrongHitObject hitObject) => new StrongNestedHit(hitObject, this);
|
||||
|
||||
private class StrongHandler : DrawableStrongHandler
|
||||
private class StrongNestedHit : DrawableStrongNestedHit
|
||||
{
|
||||
/// <summary>
|
||||
/// The lenience for the second key press.
|
||||
@ -139,7 +139,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
|
||||
public new DrawableHit MainObject => (DrawableHit)base.MainObject;
|
||||
|
||||
public StrongHandler(StrongHitObject strong, DrawableHit hit)
|
||||
public StrongNestedHit(StrongHitObject strong, DrawableHit hit)
|
||||
: base(strong, hit)
|
||||
{
|
||||
}
|
||||
|
@ -9,11 +9,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
/// <summary>
|
||||
/// Used as a nested hitobject to provide <see cref="TaikoStrongJudgement"/>s for <see cref="DrawableTaikoHitObject"/>s.
|
||||
/// </summary>
|
||||
public abstract class DrawableStrongHandler : DrawableTaikoHitObject
|
||||
public abstract class DrawableStrongNestedHit : DrawableTaikoHitObject
|
||||
{
|
||||
public readonly DrawableHitObject MainObject;
|
||||
|
||||
protected DrawableStrongHandler(StrongHitObject strong, DrawableHitObject mainObject)
|
||||
protected DrawableStrongNestedHit(StrongHitObject strong, DrawableHitObject mainObject)
|
||||
: base(strong)
|
||||
{
|
||||
MainObject = mainObject;
|
||||
|
@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
var strongObject = HitObject.NestedHitObjects.OfType<StrongHitObject>().FirstOrDefault();
|
||||
if (strongObject != null)
|
||||
{
|
||||
var vis = CreateStrongHandler(strongObject);
|
||||
var vis = CreateStrongHit(strongObject);
|
||||
if (vis != null)
|
||||
{
|
||||
AddNested(vis);
|
||||
@ -127,6 +127,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The strong hitobject.</param>
|
||||
/// <returns>The strong hitobject handler.</returns>
|
||||
protected virtual DrawableStrongHandler CreateStrongHandler(StrongHitObject hitObject) => null;
|
||||
protected virtual DrawableStrongNestedHit CreateStrongHit(StrongHitObject hitObject) => null;
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
{
|
||||
case TaikoStrongJudgement _:
|
||||
if (result.IsHit)
|
||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongHandler)judgedObject).MainObject)?.VisualiseSecondHit();
|
||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit();
|
||||
break;
|
||||
default:
|
||||
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
||||
|
Loading…
Reference in New Issue
Block a user