mirror of https://github.com/hykilpikonna/AquaDX
[O] Show quick skip after 1sec
Build AquaMai / build (push) Has been cancelled
Details
Build AquaMai / build (push) Has been cancelled
Details
parent
cd075a3559
commit
29bb54d2cc
|
@ -12,13 +12,13 @@ namespace AquaMai.TimeSaving;
|
||||||
|
|
||||||
public class ShowQuickEndPlay
|
public class ShowQuickEndPlay
|
||||||
{
|
{
|
||||||
private static bool _showUi;
|
private static int _timer;
|
||||||
|
|
||||||
[HarmonyPatch(typeof(GameProcess), "OnStart")]
|
[HarmonyPatch(typeof(GameProcess), "OnStart")]
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
public static void GameProcessPostStart(GameMonitor[] ____monitors)
|
public static void GameProcessPostStart(GameMonitor[] ____monitors)
|
||||||
{
|
{
|
||||||
_showUi = false;
|
_timer = 0;
|
||||||
____monitors[0].gameObject.AddComponent<Ui>();
|
____monitors[0].gameObject.AddComponent<Ui>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,14 +26,20 @@ public class ShowQuickEndPlay
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
public static void GameProcessPostUpdate(GameProcess __instance, Message[] ____message, ProcessDataContainer ___container, byte ____sequence)
|
public static void GameProcessPostUpdate(GameProcess __instance, Message[] ____message, ProcessDataContainer ___container, byte ____sequence)
|
||||||
{
|
{
|
||||||
_showUi = ____sequence switch
|
switch (____sequence)
|
||||||
{
|
{
|
||||||
9 => false,
|
case 9:
|
||||||
> 4 => true,
|
_timer = 0;
|
||||||
_ => false
|
break;
|
||||||
};
|
case > 4:
|
||||||
|
_timer++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
_timer = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (_showUi && (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B4) || InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.E4)))
|
if (_timer > 60 && (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B4) || InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.E4)))
|
||||||
{
|
{
|
||||||
var traverse = Traverse.Create(__instance);
|
var traverse = Traverse.Create(__instance);
|
||||||
___container.processManager.SendMessage(____message[0]);
|
___container.processManager.SendMessage(____message[0]);
|
||||||
|
@ -46,7 +52,7 @@ public class ShowQuickEndPlay
|
||||||
{
|
{
|
||||||
public void OnGUI()
|
public void OnGUI()
|
||||||
{
|
{
|
||||||
if (!_showUi) return;
|
if (_timer < 60) return;
|
||||||
|
|
||||||
// 这里重新 setup 一下 style 也可以
|
// 这里重新 setup 一下 style 也可以
|
||||||
var x = GuiSizes.PlayerCenter;
|
var x = GuiSizes.PlayerCenter;
|
||||||
|
|
Loading…
Reference in New Issue