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