mirror of https://github.com/hykilpikonna/AquaDX
[O] better _isPlaying detection
parent
4006438d93
commit
bf9855abd1
|
@ -10,11 +10,17 @@ public class TouchToButtonInput
|
||||||
private static bool _isPlaying = false;
|
private static bool _isPlaying = false;
|
||||||
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(GameProcess),"OnUpdate")]
|
[HarmonyPatch(typeof(GameProcess), "OnStart")]
|
||||||
public static void OnUpdate(GameProcess __instance)
|
public static void OnGameProcessStart(GameProcess __instance)
|
||||||
{
|
{
|
||||||
var notesManager = new NotesManager();
|
_isPlaying = true;
|
||||||
_isPlaying = notesManager.IsPlaying();
|
}
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(GameProcess), "OnRelease")]
|
||||||
|
public static void OnGameProcessRelease(GameProcess __instance)
|
||||||
|
{
|
||||||
|
_isPlaying = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
|
|
Loading…
Reference in New Issue