mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-15 00:27:26 +08:00
[O] better _isPlaying detection
This commit is contained in:
@@ -10,11 +10,17 @@ public class TouchToButtonInput
|
||||
private static bool _isPlaying = false;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(GameProcess),"OnUpdate")]
|
||||
public static void OnUpdate(GameProcess __instance)
|
||||
[HarmonyPatch(typeof(GameProcess), "OnStart")]
|
||||
public static void OnGameProcessStart(GameProcess __instance)
|
||||
{
|
||||
var notesManager = new NotesManager();
|
||||
_isPlaying = notesManager.IsPlaying();
|
||||
_isPlaying = true;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(GameProcess), "OnRelease")]
|
||||
public static void OnGameProcessRelease(GameProcess __instance)
|
||||
{
|
||||
_isPlaying = false;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
|
||||
Reference in New Issue
Block a user