Add bindable adjustments for DT/HT rate

This commit is contained in:
Dean Herbert 2019-12-06 19:15:49 +09:00
parent e37526888c
commit 0c7e5a2e3b
2 changed files with 26 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}