forked from akanyan/mu3-mods
feat: various enhancements
* AttractVideoPlayer,LoadBoost: allow setting a cache directory * AttractVideoPlayer: color leds * BetterGiveUp: prevent multiple restarts in a row * use GetTriggerOn in general where applicable
This commit is contained in:
@ -13,6 +13,7 @@ class patch_PlayMusic: PlayMusic {
|
||||
public static bool QuickSkip = false;
|
||||
private GameEngine _gameEngine;
|
||||
private SessionInfo _sessionInfo;
|
||||
private bool _pressedYellow;
|
||||
private bool _isRolling;
|
||||
private float _totalRollingFrame;
|
||||
private DateTime _rollingStartTime;
|
||||
@ -30,11 +31,13 @@ class patch_PlayMusic: PlayMusic {
|
||||
return min + (max - min) * Math.Pow(progress, 2.0);
|
||||
}
|
||||
|
||||
private static bool IsHolding() {
|
||||
return Singleton<UIInput>.instance.getStateOn(UIInput.Key.MenuLeft) ^ Singleton<UIInput>.instance.getStateOn(UIInput.Key.MenuRight);
|
||||
private bool IsHolding() {
|
||||
return Singleton<UIInput>.instance.getStateOn(UIInput.Key.MenuLeft)
|
||||
^ (_pressedYellow && Singleton<UIInput>.instance.getStateOn(UIInput.Key.MenuRight));
|
||||
}
|
||||
|
||||
private void StartRolling() {
|
||||
_pressedYellow = false;
|
||||
_isRolling = true;
|
||||
_totalRollingFrame = ntMgr.getCurrentFrame();
|
||||
_rollingStartTime = CustomDateTime.Now;
|
||||
@ -60,6 +63,9 @@ class patch_PlayMusic: PlayMusic {
|
||||
}
|
||||
|
||||
private void Execute_Play() {
|
||||
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuRight)) {
|
||||
_pressedYellow = true;
|
||||
}
|
||||
if(_isRolling) {
|
||||
TimeSpan timeSpan = CustomDateTime.Now - _rollingStartTime;
|
||||
if(timeSpan <= ROLL_DURATION) {
|
||||
|
Reference in New Issue
Block a user