mirror of https://github.com/ppy/osu
Add bindable adjustments for DT/HT rate
This commit is contained in:
parent
e37526888c
commit
0c7e5a2e3b
|
@ -3,7 +3,9 @@
|
|||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
|
@ -19,6 +21,16 @@ public abstract class ModDoubleTime : ModTimeAdjust, IApplicableToClock
|
|||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModHalfTime)).ToArray();
|
||||
|
||||
protected override double RateAdjust => 1.5;
|
||||
[SettingSource("Speed increase", "The actual increase to apply")]
|
||||
public BindableNumber<double> SpeedChange { get; } = new BindableDouble
|
||||
{
|
||||
MinValue = 1.01,
|
||||
MaxValue = 2,
|
||||
Default = 1.5,
|
||||
Value = 1.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
protected override double RateAdjust => SpeedChange.Value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
|
@ -19,6 +21,16 @@ public abstract class ModHalfTime : ModTimeAdjust, IApplicableToClock
|
|||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModDoubleTime)).ToArray();
|
||||
|
||||
protected override double RateAdjust => 0.75;
|
||||
[SettingSource("Speed decrease", "The actual decrease to apply")]
|
||||
public BindableNumber<double> SpeedChange { get; } = new BindableDouble
|
||||
{
|
||||
MinValue = 0.5,
|
||||
MaxValue = 0.99,
|
||||
Default = 0.75,
|
||||
Value = 0.75,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
protected override double RateAdjust => SpeedChange.Value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue