Remove bindable from ModeMultiplier

This commit is contained in:
mk-56 2022-01-24 09:07:07 +01:00
parent ed84ae0ac0
commit 161a2a321e
5 changed files with 9 additions and 25 deletions

View File

@ -33,13 +33,9 @@ namespace osu.Game.Rulesets.Catch.Mods
Precision = 0.1f
};
protected override BindableNumber<float> ModeMultiplier { get; } = new BindableNumber<float>
{
Default = 350,
Value = 350,
};
protected override float ModeMultiplier => 350;
public override Flashlight CreateFlashlight() => new CatchFlashlight(playfield, ChangeRadius.Value, InitialRadius.Value, ModeMultiplier.Value);
public override Flashlight CreateFlashlight() => new CatchFlashlight(playfield, ChangeRadius.Value, InitialRadius.Value, ModeMultiplier);
private CatchPlayfield playfield;

View File

@ -34,13 +34,9 @@ namespace osu.Game.Rulesets.Mania.Mods
Precision = 0.1f
};
protected override BindableNumber<float> ModeMultiplier { get; } = new BindableNumber<float>
{
Default = 50,
Value = 50,
};
protected override float ModeMultiplier => 50;
public override Flashlight CreateFlashlight() => new ManiaFlashlight(ChangeRadius.Value, InitialRadius.Value, ModeMultiplier.Value);
public override Flashlight CreateFlashlight() => new ManiaFlashlight(ChangeRadius.Value, InitialRadius.Value, ModeMultiplier);
private class ManiaFlashlight : Flashlight
{

View File

@ -47,15 +47,11 @@ namespace osu.Game.Rulesets.Osu.Mods
Precision = 0.1f
};
protected override BindableNumber<float> ModeMultiplier { get; } = new BindableNumber<float>
{
Default = 180,
Value = 180,
};
protected override float ModeMultiplier => 180;
private OsuFlashlight flashlight;
public override Flashlight CreateFlashlight() => flashlight = new OsuFlashlight(ChangeRadius.Value, InitialRadius.Value, FollowDelay.Value, ModeMultiplier.Value);
public override Flashlight CreateFlashlight() => flashlight = new OsuFlashlight(ChangeRadius.Value, InitialRadius.Value, FollowDelay.Value, ModeMultiplier);
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
{

View File

@ -34,13 +34,9 @@ namespace osu.Game.Rulesets.Taiko.Mods
Precision = 0.1f
};
protected override BindableNumber<float> ModeMultiplier { get; } = new BindableNumber<float>
{
Default = 250,
Value = 250,
};
protected override float ModeMultiplier => 250;
public override Flashlight CreateFlashlight() => new TaikoFlashlight(playfield, ChangeRadius.Value, InitialRadius.Value, ModeMultiplier.Value);
public override Flashlight CreateFlashlight() => new TaikoFlashlight(playfield, ChangeRadius.Value, InitialRadius.Value, ModeMultiplier);
private TaikoPlayfield playfield;

View File

@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Mods
[SettingSource("Initial radius", "Initial radius of the flashlight area.")]
public abstract BindableNumber<float> InitialRadius { get; }
protected abstract BindableNumber<float> ModeMultiplier { get; }
protected abstract float ModeMultiplier { get; }
}
public abstract class ModFlashlight<T> : ModFlashlight, IApplicableToDrawableRuleset<T>, IApplicableToScoreProcessor