mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Initial commit
This commit is contained in:
@ -16,17 +16,19 @@ namespace osu.Game.Rulesets.Mania.Mods
|
||||
public override double ScoreMultiplier => 1;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModHidden) };
|
||||
|
||||
private const float default_flashlight_size = 180;
|
||||
public override bool DefaultComboDependency => false;
|
||||
public override float DefaultRadius => 180;
|
||||
|
||||
public override Flashlight CreateFlashlight() => new ManiaFlashlight();
|
||||
public override Flashlight CreateFlashlight() => new ManiaFlashlight(ChangeRadius.Value, InitialRadius.Value);
|
||||
|
||||
private class ManiaFlashlight : Flashlight
|
||||
{
|
||||
private readonly LayoutValue flashlightProperties = new LayoutValue(Invalidation.DrawSize);
|
||||
|
||||
public ManiaFlashlight()
|
||||
public ManiaFlashlight(bool isRadiusBasedOnCombo, float initialRadius)
|
||||
: base(isRadiusBasedOnCombo, initialRadius)
|
||||
{
|
||||
FlashlightSize = new Vector2(0, default_flashlight_size);
|
||||
FlashlightSize = new Vector2(DrawWidth, GetRadiusFor(0));
|
||||
|
||||
AddLayout(flashlightProperties);
|
||||
}
|
||||
@ -46,9 +48,12 @@ namespace osu.Game.Rulesets.Mania.Mods
|
||||
|
||||
protected override void OnComboChange(ValueChangedEvent<int> e)
|
||||
{
|
||||
this.TransformTo(nameof(FlashlightSize), new Vector2(DrawWidth, GetRadiusFor(e.NewValue)), FLASHLIGHT_FADE_DURATION);
|
||||
}
|
||||
|
||||
protected override string FragmentShader => "RectangularFlashlight";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user