Refactor code regarding hidden boolean

This commit is contained in:
MBmasher 2021-12-21 20:58:05 +11:00
parent c5de203aa5
commit 2aafcd3628

View File

@ -19,8 +19,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
public Flashlight(Mod[] mods)
: base(mods)
{
this.mods = mods;
this.hidden = mods.Any(m => m is OsuModHidden);
hidden = mods.Any(m => m is OsuModHidden);
}
private double skillMultiplier => 0.05;
@ -28,8 +27,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
protected override double DecayWeight => 1.0;
protected override int HistoryLength => 10; // Look back for 10 notes is added for the sake of flashlight calculations.
private readonly Mod[] mods;
private bool hidden;
private readonly bool hidden;
private const double max_opacity_bonus = 0.4;
private const double hidden_bonus = 0.2;