mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 01:03:21 +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")]
|
[SettingSource("Final rate", "The final speed to ramp to")]
|
||||||
public abstract BindableNumber<double> FinalRate { get; }
|
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 finalRateTime;
|
||||||
private double beginRampTime;
|
private double beginRampTime;
|
||||||
|
|
||||||
@ -61,7 +64,10 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
|
|
||||||
public virtual void Update(Playfield playfield)
|
public virtual void Update(Playfield playfield)
|
||||||
{
|
{
|
||||||
|
if (!Reverse.Value)
|
||||||
applyAdjustment((track.CurrentTime - beginRampTime) / finalRateTime);
|
applyAdjustment((track.CurrentTime - beginRampTime) / finalRateTime);
|
||||||
|
else
|
||||||
|
applyAdjustment(1 - ((track.CurrentTime - beginRampTime) / finalRateTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user