From c06e558f874fe975502894658617d00214731777 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Dec 2019 18:12:37 +0800 Subject: [PATCH] add setting to start fully wounded --- osu.Game/Rulesets/Mods/ModTimeRamp.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Mods/ModTimeRamp.cs b/osu.Game/Rulesets/Mods/ModTimeRamp.cs index 133f9ceb39..d21990ae91 100644 --- a/osu.Game/Rulesets/Mods/ModTimeRamp.cs +++ b/osu.Game/Rulesets/Mods/ModTimeRamp.cs @@ -23,6 +23,9 @@ namespace osu.Game.Rulesets.Mods [SettingSource("Final rate", "The final speed to ramp to")] public abstract BindableNumber 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)); } ///