Extract DefaultFlashlightSize to base flashlight class

This commit is contained in:
Bartłomiej Dach 2022-01-24 20:46:54 +01:00
parent a7c0d507ce
commit 5874475dff
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
5 changed files with 10 additions and 4 deletions

View File

@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Catch.Mods
Value = true
};
protected virtual float DefaultFlashlightSize => 350;
public override float DefaultFlashlightSize => 350;
public override Flashlight CreateFlashlight() => new CatchFlashlight(playfield, ComboBasedSize.Value, SizeMultiplier.Value, DefaultFlashlightSize);

View File

@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Mania.Mods
Value = false
};
protected virtual float DefaultFlashlightSize => 50;
public override float DefaultFlashlightSize => 50;
public override Flashlight CreateFlashlight() => new ManiaFlashlight(ComboBasedSize.Value, SizeMultiplier.Value, DefaultFlashlightSize);

View File

@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Osu.Mods
Value = true
};
protected virtual float DefaultFlashlightSize => 180;
public override float DefaultFlashlightSize => 180;
private OsuFlashlight flashlight;

View File

@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
Value = true
};
protected virtual float DefaultFlashlightSize => 250;
public override float DefaultFlashlightSize => 250;
public override Flashlight CreateFlashlight() => new TaikoFlashlight(playfield, ComboBasedSize.Value, SizeMultiplier.Value, DefaultFlashlightSize);

View File

@ -38,6 +38,12 @@ namespace osu.Game.Rulesets.Mods
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
public abstract BindableBool ComboBasedSize { get; }
/// <summary>
/// The default size of the flashlight in ruleset-appropriate dimensions.
/// <see cref="SizeMultiplier"/> and <see cref="ComboBasedSize"/> will apply their adjustments on top of this size.
/// </summary>
public abstract float DefaultFlashlightSize { get; }
}
public abstract class ModFlashlight<T> : ModFlashlight, IApplicableToDrawableRuleset<T>, IApplicableToScoreProcessor