Rename variable

This commit is contained in:
Dean Herbert 2023-09-12 20:51:22 +09:00
parent 39d69903ab
commit e810abf1e6
2 changed files with 7 additions and 7 deletions

View File

@ -312,7 +312,7 @@ private void updateBonusScore()
tick.TriggerResult(true);
if (tick is DrawableSpinnerBonusTick)
gainedBonus.Value = score_per_tick * (spins - HitObject.FirstBonusSpin);
gainedBonus.Value = score_per_tick * (spins - HitObject.SpinsRequiredForBonus);
}
completedFullSpins++;

View File

@ -31,6 +31,11 @@ public double EndTime
/// </summary>
public int SpinsRequired { get; protected set; } = 1;
/// <summary>
/// The number of spins required to start receiving bonus score. The first bonus is awarded on this spin count.
/// </summary>
public int SpinsRequiredForBonus => SpinsRequired + bonus_spins_gap;
/// <summary>
/// The gap between spinner completion and the first bonus-awarding spin.
/// </summary>
@ -41,11 +46,6 @@ public double EndTime
/// </summary>
public int MaximumBonusSpins { get; protected set; } = 1;
/// <summary>
/// The first spin awarding bonus score.
/// </summary>
public int FirstBonusSpin => SpinsRequired + bonus_spins_gap;
public override Vector2 StackOffset => Vector2.Zero;
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, IBeatmapDifficultyInfo difficulty)
@ -73,7 +73,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
double startTime = StartTime + (float)(i + 1) / totalSpins * Duration;
AddNested(i < FirstBonusSpin
AddNested(i < SpinsRequiredForBonus
? new SpinnerTick { StartTime = startTime, SpinnerDuration = Duration }
: new SpinnerBonusTick { StartTime = startTime, SpinnerDuration = Duration, Samples = new[] { CreateHitSampleInfo("spinnerbonus") } });
}