Skip to content

Commit

Permalink
[F] Seek resets speed
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Oct 16, 2024
1 parent 1810bbe commit 953083a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
16 changes: 14 additions & 2 deletions AquaMai/Utils/PractiseMode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using AquaMai.Fix;
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions AquaMai/Utils/PractiseModeUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 953083a

Please sign in to comment.