From 953083a0bf38e42f730b5861c1e3a5214f061273 Mon Sep 17 00:00:00 2001 From: Clansty Date: Wed, 16 Oct 2024 18:11:17 +0800 Subject: [PATCH] [F] Seek resets speed --- AquaMai/Utils/PractiseMode.cs | 16 ++++++++++++++-- AquaMai/Utils/PractiseModeUI.cs | 6 ++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/AquaMai/Utils/PractiseMode.cs b/AquaMai/Utils/PractiseMode.cs index 35df7592..5dde577f 100644 --- a/AquaMai/Utils/PractiseMode.cs +++ b/AquaMai/Utils/PractiseMode.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Diagnostics; using AquaMai.Fix; @@ -51,6 +52,17 @@ public static void SetSpeed() movie.player.SetSpeed(speed); } + private static IEnumerator SetSpeedCoroutineInner() + { + yield return null; + SetSpeed(); + } + + public static void SetSpeedCoroutine() + { + SharedInstances.GameMainObject.StartCoroutine(SetSpeedCoroutineInner()); + } + public static void SpeedUp() { speed += .05f; @@ -65,9 +77,9 @@ public static void SpeedUp() public static void SpeedDown() { speed -= .05f; - if (speed < 0.5) + if (speed < 0.05) { - speed = 0.5f; + speed = 0.05f; } SetSpeed(); diff --git a/AquaMai/Utils/PractiseModeUI.cs b/AquaMai/Utils/PractiseModeUI.cs index 216e47cd..49ac913a 100644 --- a/AquaMai/Utils/PractiseModeUI.cs +++ b/AquaMai/Utils/PractiseModeUI.cs @@ -91,14 +91,20 @@ public void Update() if (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.E8)) { DebugFeature.Seek(-1000); + PractiseMode.SetSpeedCoroutine(); } else if (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.E2)) { DebugFeature.Seek(1000); + PractiseMode.SetSpeedCoroutine(); } else if (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B8) || InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B1)) { DebugFeature.Pause = !DebugFeature.Pause; + if (!DebugFeature.Pause) + { + PractiseMode.SetSpeedCoroutine(); + } } else if (InputManager.GetTouchPanelAreaDown(InputManager.TouchPanelArea.B7) && PractiseMode.repeatStart == -1) {