mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:43:16 +08:00
add setting to start fully wounded
This commit is contained in:
parent
6eac5d03ad
commit
c06e558f87
@ -23,6 +23,9 @@ namespace osu.Game.Rulesets.Mods
|
||||
[SettingSource("Final rate", "The final speed to ramp to")]
|
||||
public abstract BindableNumber<double> FinalRate { get; }
|
||||
|
||||
[SettingSource("Start wounded", "Start at 100% of the final rate")]
|
||||
public BindableBool Reverse { get; } = new BindableBool();
|
||||
|
||||
private double finalRateTime;
|
||||
private double beginRampTime;
|
||||
|
||||
@ -61,7 +64,10 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public virtual void Update(Playfield playfield)
|
||||
{
|
||||
applyAdjustment((track.CurrentTime - beginRampTime) / finalRateTime);
|
||||
if (!Reverse.Value)
|
||||
applyAdjustment((track.CurrentTime - beginRampTime) / finalRateTime);
|
||||
else
|
||||
applyAdjustment(1 - ((track.CurrentTime - beginRampTime) / finalRateTime));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user