From 3a7eb7dd25f8e2da74684ec3395d79f5a917e92f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 15 Oct 2021 14:27:20 +0900 Subject: [PATCH] Make const private --- osu.Game.Rulesets.Osu/Mods/OsuModNoScope.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModNoScope.cs b/osu.Game.Rulesets.Osu/Mods/OsuModNoScope.cs index 09870f2758..c48cbd9992 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModNoScope.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModNoScope.cs @@ -19,7 +19,12 @@ namespace osu.Game.Rulesets.Osu.Mods { public class OsuModNoScope : Mod, IUpdatableByPlayfield, IApplicableToScoreProcessor { - public const float CURSOR_ALPHA_TRANSITION_DURATION = 100; + /// + /// Slightly higher than the cutoff for . + /// + private const float min_alpha = 0.0002f; + + private const float transition_duration = 100; public override string Name => "No Scope"; public override string Acronym => "NS"; @@ -47,11 +52,6 @@ namespace osu.Game.Rulesets.Osu.Mods public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank; - /// - /// Slightly higher than the cutoff for . - /// - private const float min_alpha = 0.0002f; - public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor) { if (HiddenComboCount.Value == 0) return; @@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Mods public virtual void Update(Playfield playfield) { - playfield.Cursor.Alpha = (float)Interpolation.Lerp(playfield.Cursor.Alpha, targetAlpha, Math.Clamp(playfield.Time.Elapsed / CURSOR_ALPHA_TRANSITION_DURATION, 0, 1)); + playfield.Cursor.Alpha = (float)Interpolation.Lerp(playfield.Cursor.Alpha, targetAlpha, Math.Clamp(playfield.Time.Elapsed / transition_duration, 0, 1)); } }