mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 20:23:00 +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) };
|
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(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()
|
private void addMissJudgement()
|
||||||
@ -226,9 +226,9 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
rulesetContainer.Playfield.Add(new DrawableRimHit(h));
|
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)
|
: 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)
|
: base(strong, drumRoll)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -51,11 +51,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
public override bool OnPressed(TaikoAction action) => UpdateResult(true);
|
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)
|
: 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>
|
/// <summary>
|
||||||
/// The lenience for the second key press.
|
/// 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 new DrawableHit MainObject => (DrawableHit)base.MainObject;
|
||||||
|
|
||||||
public StrongHandler(StrongHitObject strong, DrawableHit hit)
|
public StrongNestedHit(StrongHitObject strong, DrawableHit hit)
|
||||||
: base(strong, hit)
|
: base(strong, hit)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -9,11 +9,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used as a nested hitobject to provide <see cref="TaikoStrongJudgement"/>s for <see cref="DrawableTaikoHitObject"/>s.
|
/// Used as a nested hitobject to provide <see cref="TaikoStrongJudgement"/>s for <see cref="DrawableTaikoHitObject"/>s.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class DrawableStrongHandler : DrawableTaikoHitObject
|
public abstract class DrawableStrongNestedHit : DrawableTaikoHitObject
|
||||||
{
|
{
|
||||||
public readonly DrawableHitObject MainObject;
|
public readonly DrawableHitObject MainObject;
|
||||||
|
|
||||||
protected DrawableStrongHandler(StrongHitObject strong, DrawableHitObject mainObject)
|
protected DrawableStrongNestedHit(StrongHitObject strong, DrawableHitObject mainObject)
|
||||||
: base(strong)
|
: base(strong)
|
||||||
{
|
{
|
||||||
MainObject = mainObject;
|
MainObject = mainObject;
|
||||||
|
@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
var strongObject = HitObject.NestedHitObjects.OfType<StrongHitObject>().FirstOrDefault();
|
var strongObject = HitObject.NestedHitObjects.OfType<StrongHitObject>().FirstOrDefault();
|
||||||
if (strongObject != null)
|
if (strongObject != null)
|
||||||
{
|
{
|
||||||
var vis = CreateStrongHandler(strongObject);
|
var vis = CreateStrongHit(strongObject);
|
||||||
if (vis != null)
|
if (vis != null)
|
||||||
{
|
{
|
||||||
AddNested(vis);
|
AddNested(vis);
|
||||||
@ -127,6 +127,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hitObject">The strong hitobject.</param>
|
/// <param name="hitObject">The strong hitobject.</param>
|
||||||
/// <returns>The strong hitobject handler.</returns>
|
/// <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 _:
|
case TaikoStrongJudgement _:
|
||||||
if (result.IsHit)
|
if (result.IsHit)
|
||||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongHandler)judgedObject).MainObject)?.VisualiseSecondHit();
|
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
||||||
|
Loading…
Reference in New Issue
Block a user