mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Extract DefaultFlashlightSize
to base flashlight class
This commit is contained in:
parent
a7c0d507ce
commit
5874475dff
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user