mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:43:21 +08:00
Use cancellation token in taiko swell/drumroll
This commit is contained in:
parent
6cd1753459
commit
6534510999
@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
|
||||
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
||||
{
|
||||
createTicks();
|
||||
createTicks(cancellationToken);
|
||||
|
||||
RequiredGoodHits = NestedHitObjects.Count * Math.Min(0.15, 0.05 + 0.10 / 6 * overallDifficulty);
|
||||
RequiredGreatHits = NestedHitObjects.Count * Math.Min(0.30, 0.10 + 0.20 / 6 * overallDifficulty);
|
||||
@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
base.CreateNestedHitObjects(cancellationToken);
|
||||
}
|
||||
|
||||
private void createTicks()
|
||||
private void createTicks(CancellationToken cancellationToken)
|
||||
{
|
||||
if (tickSpacing == 0)
|
||||
return;
|
||||
@ -93,6 +93,8 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
|
||||
for (double t = StartTime; t < EndTime + tickSpacing / 2; t += tickSpacing)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
AddNested(new DrumRollTick
|
||||
{
|
||||
FirstTick = first,
|
||||
|
@ -35,8 +35,11 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
base.CreateNestedHitObjects(cancellationToken);
|
||||
|
||||
for (int i = 0; i < RequiredHits; i++)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
AddNested(new SwellTick());
|
||||
}
|
||||
}
|
||||
|
||||
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user