mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 19:23:21 +08:00
Add a reverse setting for Winding mods (#7222)
Add a reverse setting for Winding mods
This commit is contained in:
commit
9f0f09a844
@ -20,6 +20,9 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const double final_rate_progress = 0.75f;
|
private const double final_rate_progress = 0.75f;
|
||||||
|
|
||||||
|
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||||
|
public abstract BindableNumber<double> InitialRate { get; }
|
||||||
|
|
||||||
[SettingSource("Final rate", "The final speed to ramp to")]
|
[SettingSource("Final rate", "The final speed to ramp to")]
|
||||||
public abstract BindableNumber<double> FinalRate { get; }
|
public abstract BindableNumber<double> FinalRate { get; }
|
||||||
|
|
||||||
@ -69,6 +72,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="amount">The amount of adjustment to apply (from 0..1).</param>
|
/// <param name="amount">The amount of adjustment to apply (from 0..1).</param>
|
||||||
private void applyAdjustment(double amount) =>
|
private void applyAdjustment(double amount) =>
|
||||||
SpeedChange.Value = 1 + (FinalRate.Value - 1) * Math.Clamp(amount, 0, 1);
|
SpeedChange.Value = InitialRate.Value + (FinalRate.Value - InitialRate.Value) * Math.Clamp(amount, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,16 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleDown;
|
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleDown;
|
||||||
public override double ScoreMultiplier => 1.0;
|
public override double ScoreMultiplier => 1.0;
|
||||||
|
|
||||||
|
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||||
|
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||||
|
{
|
||||||
|
MinValue = 1,
|
||||||
|
MaxValue = 2,
|
||||||
|
Default = 1,
|
||||||
|
Value = 1,
|
||||||
|
Precision = 0.01,
|
||||||
|
};
|
||||||
|
|
||||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,16 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleUp;
|
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleUp;
|
||||||
public override double ScoreMultiplier => 1.0;
|
public override double ScoreMultiplier => 1.0;
|
||||||
|
|
||||||
|
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||||
|
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||||
|
{
|
||||||
|
MinValue = 0.5,
|
||||||
|
MaxValue = 1,
|
||||||
|
Default = 1,
|
||||||
|
Value = 1,
|
||||||
|
Precision = 0.01,
|
||||||
|
};
|
||||||
|
|
||||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user