1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 22:22:54 +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);
}
public DrawableFlyingCentreHit(double time)
: base(new Hit { StartTime = time })
public DrawableFlyingCentreHit(double time, bool isStrong = false)
: base(new Hit { StartTime = time, IsStrong = isStrong })
{
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,
/// regardless of any judgement.
/// </summary>
public Action<TaikoAction> OnHit;
public Action<TaikoAction, bool> OnHit;
public DrawableDrumRoll(DrumRoll drumRoll)
: base(drumRoll)
@ -97,7 +97,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
public override bool OnPressed(TaikoAction action)
{
if (judgingStarted)
OnHit.Invoke(action);
OnHit.Invoke(action, HitObject.IsStrong);
return false;
}
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
if (result.Type > HitResult.Miss)
{
OnHit.Invoke(drumRollTick.JudgedAction);
OnHit.Invoke(drumRollTick.JudgedAction, HitObject.IsStrong);
judgingStarted = true;
rollingHits++;
}

View File

@ -34,8 +34,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
ApplyResult(r => r.Type = HitResult.Good);
}
public DrawableFlyingRimHit(double time)
: base(new Hit { StartTime = time })
public DrawableFlyingRimHit(double time, bool isStrong = false)
: base(new Hit { StartTime = time, IsStrong = isStrong })
{
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;
if (action == TaikoAction.LeftRim || action == TaikoAction.RightRim)
drawableHit = new DrawableFlyingRimHit(Time.Current);
drawableHit = new DrawableFlyingRimHit(Time.Current, isStrong);
else
drawableHit = new DrawableFlyingCentreHit(Time.Current);
drawableHit = new DrawableFlyingCentreHit(Time.Current, isStrong);
drumRollHitContainer.Add(drawableHit);
}