1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 17:45:07 +08:00

Added logic to allow strong notes

This commit is contained in:
Tim Oliver 2020-04-07 17:25:47 +08:00
parent 3fec213c92
commit a1e215888e
4 changed files with 10 additions and 10 deletions

View File

@ -34,8 +34,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
ApplyResult(r => r.Type = HitResult.Good); ApplyResult(r => r.Type = HitResult.Good);
} }
public DrawableFlyingCentreHit(double time) public DrawableFlyingCentreHit(double time, bool isStrong = false)
: base(new Hit { StartTime = time }) : base(new Hit { StartTime = time, IsStrong = isStrong })
{ {
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty()); HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
} }

View File

@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
/// A handler action for when the drumroll has been hit, /// A handler action for when the drumroll has been hit,
/// regardless of any judgement. /// regardless of any judgement.
/// </summary> /// </summary>
public Action<TaikoAction> OnHit; public Action<TaikoAction, bool> OnHit;
public DrawableDrumRoll(DrumRoll drumRoll) public DrawableDrumRoll(DrumRoll drumRoll)
: base(drumRoll) : base(drumRoll)
@ -97,7 +97,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
public override bool OnPressed(TaikoAction action) public override bool OnPressed(TaikoAction action)
{ {
if (judgingStarted) if (judgingStarted)
OnHit.Invoke(action); OnHit.Invoke(action, HitObject.IsStrong);
return false; return false;
} }
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
if (result.Type > HitResult.Miss) if (result.Type > HitResult.Miss)
{ {
OnHit.Invoke(drumRollTick.JudgedAction); OnHit.Invoke(drumRollTick.JudgedAction, HitObject.IsStrong);
judgingStarted = true; judgingStarted = true;
rollingHits++; rollingHits++;
} }

View File

@ -34,8 +34,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
ApplyResult(r => r.Type = HitResult.Good); ApplyResult(r => r.Type = HitResult.Good);
} }
public DrawableFlyingRimHit(double time) public DrawableFlyingRimHit(double time, bool isStrong = false)
: base(new Hit { StartTime = time }) : base(new Hit { StartTime = time, IsStrong = isStrong })
{ {
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty()); HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
} }

View File

@ -231,14 +231,14 @@ namespace osu.Game.Rulesets.Taiko.UI
} }
} }
private void onDrumrollArbitraryHit(TaikoAction action) private void onDrumrollArbitraryHit(TaikoAction action, bool isStrong)
{ {
DrawableHit drawableHit; DrawableHit drawableHit;
if (action == TaikoAction.LeftRim || action == TaikoAction.RightRim) if (action == TaikoAction.LeftRim || action == TaikoAction.RightRim)
drawableHit = new DrawableFlyingRimHit(Time.Current); drawableHit = new DrawableFlyingRimHit(Time.Current, isStrong);
else else
drawableHit = new DrawableFlyingCentreHit(Time.Current); drawableHit = new DrawableFlyingCentreHit(Time.Current, isStrong);
drumRollHitContainer.Add(drawableHit); drumRollHitContainer.Add(drawableHit);
} }