mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 10:27:26 +08:00
[+] Restore AutoPlay(Home) and Pause(Enter) for SDGA
This commit is contained in:
33
AquaMai/Cheat/DebugFeature.cs
Normal file
33
AquaMai/Cheat/DebugFeature.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using HarmonyLib;
|
||||
using Manager;
|
||||
using Process;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AquaMai.Cheat;
|
||||
|
||||
public class DebugFeature
|
||||
{
|
||||
# if SDGA145
|
||||
private static bool isPause = false;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(GameProcess), "OnUpdate")]
|
||||
public static void PostGameProcessUpdate(GameProcess __instance, byte ____sequence, MovieController ____gameMovie)
|
||||
{
|
||||
if (____sequence != 4) return;
|
||||
// GameSequence.Play
|
||||
if (Input.GetKeyDown(KeyCode.Home))
|
||||
{
|
||||
GameManager.AutoPlay = (GameManager.AutoPlayMode)((int)(GameManager.AutoPlay + 1) % Enum.GetNames(typeof(GameManager.AutoPlayMode)).Length);
|
||||
}
|
||||
else if (DebugInput.GetKeyDown(KeyCode.Return))
|
||||
{
|
||||
isPause = !isPause;
|
||||
SoundManager.PauseMusic(isPause);
|
||||
____gameMovie.Pause(isPause);
|
||||
NotesManager.Pause(isPause);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
}
|
||||
Reference in New Issue
Block a user