mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 23:33:23 +08:00
Match size change precision.
This commit is contained in:
parent
e6cffb0435
commit
79e0377638
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.Catch.UI;
|
||||
@ -15,12 +14,10 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
{
|
||||
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
||||
|
||||
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
|
||||
public CatchModFlashlight()
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 1.5f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
StartingFlashlightSize.MaxValue = 1.5f;
|
||||
}
|
||||
|
||||
public override float DefaultFlashlightSize => 325;
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Layout;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
@ -19,15 +18,9 @@ namespace osu.Game.Rulesets.Mania.Mods
|
||||
public ManiaModFlashlight()
|
||||
{
|
||||
FinalFlashlightSize.Default = 1;
|
||||
StartingFlashlightSize.MaxValue = 3;
|
||||
}
|
||||
|
||||
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 3f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
public override float DefaultFlashlightSize => 50;
|
||||
|
||||
protected override Flashlight CreateFlashlight() => new ManiaFlashlight(this);
|
||||
|
@ -32,13 +32,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
Precision = default_follow_delay,
|
||||
};
|
||||
|
||||
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 2f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
public override float DefaultFlashlightSize => 200;
|
||||
|
||||
private OsuFlashlight flashlight = null!;
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Layout;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
@ -16,13 +15,6 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
||||
{
|
||||
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
||||
|
||||
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 1.5f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
public override float DefaultFlashlightSize => 200;
|
||||
|
||||
protected override Flashlight CreateFlashlight() => new TaikoFlashlight(this, playfield);
|
||||
@ -32,6 +24,9 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
||||
public override void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
|
||||
{
|
||||
playfield = (TaikoPlayfield)drawableRuleset.Playfield;
|
||||
|
||||
StartingFlashlightSize.MaxValue = 1.5f;
|
||||
|
||||
base.ApplyToDrawableRuleset(drawableRuleset);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override ModType Type => ModType.DifficultyIncrease;
|
||||
public override LocalisableString Description => "Restricted view area.";
|
||||
|
||||
protected virtual float DefaultFinalFlashlightSize => 0.625f;
|
||||
private const float size_customization_precision = 0.05f;
|
||||
|
||||
private float findClosestMultipleFrom(int value, float multiple) => MathF.Round(value / multiple) * multiple;
|
||||
|
||||
@ -52,14 +52,19 @@ namespace osu.Game.Rulesets.Mods
|
||||
}
|
||||
|
||||
[SettingSource("Starting flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||
public abstract BindableFloat StartingFlashlightSize { get; }
|
||||
public BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 2,
|
||||
Precision = size_customization_precision
|
||||
};
|
||||
|
||||
[SettingSource("Final flashlight size", "Multiplier applied to the starting flashlight size after the max flashlight combo is reached.")]
|
||||
public BindableFloat FinalFlashlightSize { get; } = new BindableFloat(0.625f)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 1,
|
||||
Precision = 0.05f
|
||||
Precision = size_customization_precision
|
||||
};
|
||||
|
||||
[SettingSource("Change size combo divisor", "Changes the combo divisor where the flashlight size is changed.")]
|
||||
|
Loading…
Reference in New Issue
Block a user