forked from akanyan/mu3-mods
feat: implement postgame skip, fix crashes
This commit is contained in:
27
SkipNotice/MU3/patch_DailyBonus.cs
Normal file
27
SkipNotice/MU3/patch_DailyBonus.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using MonoMod;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
class patch_DailyBonus: DailyBonus {
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
ItemWindow = 3,
|
||||
ExitWait = 4,
|
||||
}
|
||||
|
||||
private float waitCount;
|
||||
private State _state;
|
||||
private extern void orig_Update();
|
||||
private void Update() {
|
||||
if(_state < State.ItemWindow) {
|
||||
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.Decision)) {
|
||||
waitCount = 100.0f;
|
||||
}
|
||||
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
|
||||
waitCount = 100.0f;
|
||||
_state = State.ExitWait;
|
||||
}
|
||||
}
|
||||
orig_Update();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user