From e810abf1e61aa032ad9bc3d3a4a18cd366cacbc3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 12 Sep 2023 20:51:22 +0900 Subject: [PATCH] Rename variable --- .../Objects/Drawables/DrawableSpinner.cs | 2 +- osu.Game.Rulesets.Osu/Objects/Spinner.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs index c30ac6b88b..24446db92a 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs @@ -312,7 +312,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables tick.TriggerResult(true); if (tick is DrawableSpinnerBonusTick) - gainedBonus.Value = score_per_tick * (spins - HitObject.FirstBonusSpin); + gainedBonus.Value = score_per_tick * (spins - HitObject.SpinsRequiredForBonus); } completedFullSpins++; diff --git a/osu.Game.Rulesets.Osu/Objects/Spinner.cs b/osu.Game.Rulesets.Osu/Objects/Spinner.cs index a26cb7b090..5ef670c739 100644 --- a/osu.Game.Rulesets.Osu/Objects/Spinner.cs +++ b/osu.Game.Rulesets.Osu/Objects/Spinner.cs @@ -31,6 +31,11 @@ namespace osu.Game.Rulesets.Osu.Objects /// public int SpinsRequired { get; protected set; } = 1; + /// + /// The number of spins required to start receiving bonus score. The first bonus is awarded on this spin count. + /// + public int SpinsRequiredForBonus => SpinsRequired + bonus_spins_gap; + /// /// The gap between spinner completion and the first bonus-awarding spin. /// @@ -41,11 +46,6 @@ namespace osu.Game.Rulesets.Osu.Objects /// public int MaximumBonusSpins { get; protected set; } = 1; - /// - /// The first spin awarding bonus score. - /// - 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 @@ namespace osu.Game.Rulesets.Osu.Objects 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") } }); }