-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to preserve player speed
- Loading branch information
Showing
8 changed files
with
93 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Framework.Bindables; | ||
using osu.Game.Configuration; | ||
using osu.Game.Overlays.Settings; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Touhosu.Objects; | ||
using osu.Game.Rulesets.Touhosu.UI; | ||
using osu.Game.Rulesets.UI; | ||
|
||
namespace osu.Game.Rulesets.Touhosu.Mods | ||
{ | ||
public class TouhosuModDaycore : ModDaycore | ||
public class TouhosuModDaycore : ModDaycore, IApplicableToDrawableRuleset<TouhosuHitObject> | ||
{ | ||
public override double ScoreMultiplier => 0.3; | ||
|
||
[SettingSource("Preserve player speed", "Turn on to make player speed be unaffected by the song speed.", SettingControlType = typeof(SettingsCheckbox))] | ||
public BindableBool PreserveSpeed { get; } = new BindableBool(); | ||
|
||
public void ApplyToDrawableRuleset(DrawableRuleset<TouhosuHitObject> drawableRuleset) | ||
{ | ||
if (!PreserveSpeed.Value) | ||
return; | ||
|
||
var playfiled = (TouhosuPlayfield)drawableRuleset.Playfield; | ||
playfiled.SpeedMultiplier = 1.0 / SpeedChange.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Framework.Bindables; | ||
using osu.Game.Configuration; | ||
using osu.Game.Overlays.Settings; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Touhosu.Objects; | ||
using osu.Game.Rulesets.Touhosu.UI; | ||
using osu.Game.Rulesets.UI; | ||
|
||
namespace osu.Game.Rulesets.Touhosu.Mods | ||
{ | ||
public class TouhosuModDoubleTime : ModDoubleTime | ||
public class TouhosuModDoubleTime : ModDoubleTime, IApplicableToDrawableRuleset<TouhosuHitObject> | ||
{ | ||
public override double ScoreMultiplier => 1.1f; | ||
|
||
[SettingSource("Preserve player speed", "Turn on to make player speed be unaffected by the song speed.", SettingControlType = typeof(SettingsCheckbox))] | ||
public BindableBool PreserveSpeed { get; } = new BindableBool(); | ||
|
||
public void ApplyToDrawableRuleset(DrawableRuleset<TouhosuHitObject> drawableRuleset) | ||
{ | ||
if (!PreserveSpeed.Value) | ||
return; | ||
|
||
var playfiled = (TouhosuPlayfield)drawableRuleset.Playfield; | ||
playfiled.SpeedMultiplier = 1.0 / SpeedChange.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Framework.Bindables; | ||
using osu.Game.Configuration; | ||
using osu.Game.Overlays.Settings; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Touhosu.Objects; | ||
using osu.Game.Rulesets.Touhosu.UI; | ||
using osu.Game.Rulesets.UI; | ||
|
||
namespace osu.Game.Rulesets.Touhosu.Mods | ||
{ | ||
public class TouhosuModHalfTime : ModHalfTime | ||
public class TouhosuModHalfTime : ModHalfTime, IApplicableToDrawableRuleset<TouhosuHitObject> | ||
{ | ||
public override double ScoreMultiplier => 0.3; | ||
|
||
[SettingSource("Preserve player speed", "Turn on to make player speed be unaffected by the song speed.", SettingControlType = typeof(SettingsCheckbox))] | ||
public BindableBool PreserveSpeed { get; } = new BindableBool(); | ||
|
||
public void ApplyToDrawableRuleset(DrawableRuleset<TouhosuHitObject> drawableRuleset) | ||
{ | ||
if (!PreserveSpeed.Value) | ||
return; | ||
|
||
var playfiled = (TouhosuPlayfield)drawableRuleset.Playfield; | ||
playfiled.SpeedMultiplier = 1.0 / SpeedChange.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
using osu.Game.Rulesets.Touhosu.Objects; | ||
using osu.Framework.Bindables; | ||
using osu.Game.Configuration; | ||
using osu.Game.Overlays.Settings; | ||
using osu.Game.Rulesets.Touhosu.Objects; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Touhosu.UI; | ||
using osu.Game.Rulesets.UI; | ||
|
||
namespace osu.Game.Rulesets.Touhosu.Mods | ||
{ | ||
public class TouhosuModNightcore : ModNightcore<TouhosuHitObject> | ||
{ | ||
public override double ScoreMultiplier => 1.1f; | ||
|
||
[SettingSource("Preserve player speed", "Turn on to make player speed be unaffected by the song speed.", SettingControlType = typeof(SettingsCheckbox))] | ||
public BindableBool PreserveSpeed { get; } = new BindableBool(); | ||
|
||
public new void ApplyToDrawableRuleset(DrawableRuleset<TouhosuHitObject> drawableRuleset) | ||
{ | ||
base.ApplyToDrawableRuleset(drawableRuleset); | ||
|
||
if (!PreserveSpeed.Value) | ||
return; | ||
|
||
var playfiled = (TouhosuPlayfield)drawableRuleset.Playfield; | ||
playfiled.SpeedMultiplier = 1.0 / SpeedChange.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters