[+] Fix DebugInput (MouseTouchPanel)

pull/47/head
Clansty 2024-07-27 05:47:45 +08:00
parent 7cae5f8f10
commit a813535e3f
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 33 additions and 0 deletions

View File

@ -3,6 +3,7 @@ using AMDaemon.Allnet;
using HarmonyLib;
using Manager;
using Manager.Operation;
using UnityEngine;
namespace AquaMai.Fix;
@ -48,4 +49,36 @@ public class BasicFix
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DebugInput), "GetKey")]
private static bool GetKey(ref bool __result, KeyCode name)
{
__result = UnityEngine.Input.GetKey(name);
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DebugInput), "GetKeyDown")]
private static bool GetKeyDown(ref bool __result, KeyCode name)
{
__result = UnityEngine.Input.GetKeyDown(name);
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DebugInput), "GetMouseButton")]
private static bool GetMouseButton(ref bool __result, int button)
{
__result = UnityEngine.Input.GetMouseButton(button);
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DebugInput), "GetMouseButtonDown")]
private static bool GetMouseButtonDown(ref bool __result, int button)
{
__result = UnityEngine.Input.GetMouseButtonDown(button);
return false;
}
}