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:
parent
3fec213c92
commit
a1e215888e
@ -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());
|
||||
}
|
||||
|
@ -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++;
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user