From 4dd1fec62b0fe028d7116db87649ac0747b56090 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Fri, 19 Jan 2024 21:46:21 -0500 Subject: [PATCH] fix #640 --- Assets/Scripts/Games/TheDazzles/TheDazzles.cs | 55 ++++++++++--------- ...Generator.Editor.ProjectSettingsData.asset | 2 + 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/Assets/Scripts/Games/TheDazzles/TheDazzles.cs b/Assets/Scripts/Games/TheDazzles/TheDazzles.cs index 1051fca4..c1f3a7d4 100644 --- a/Assets/Scripts/Games/TheDazzles/TheDazzles.cs +++ b/Assets/Scripts/Games/TheDazzles/TheDazzles.cs @@ -267,11 +267,15 @@ namespace HeavenStudio.Games } } + public override void OnPlay(double beat) + { + if (queuedPoses.Count > 0) queuedPoses.Clear(); + if (queuedCrouches.Count > 0) queuedCrouches.Clear(); + } + void Update() { - var cond = Conductor.instance; - - if (cond.isPlaying && !cond.isPaused) + if (conductor.isPlaying && !conductor.isPaused) { if (queuedPoses.Count > 0) { @@ -319,33 +323,34 @@ namespace HeavenStudio.Games } shouldHold = false; } - if (PlayerInput.GetIsAction(InputAction_TouchRelease) && !GameManager.instance.autoplay) + if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch) { - player.UnPrepare(); - shouldHold = false; - } - if (PlayerInput.GetIsAction(InputAction_BasicRelease) && shouldHold && !GameManager.instance.autoplay) - { - if (doingPoses) - { - player.Pose(false); - SoundByte.PlayOneShotGame("theDazzles/miss"); - foreach (var girl in npcGirls) - { - girl.Ouch(); - } - } - else + if (PlayerInput.GetIsAction(InputAction_TouchRelease) && !gameManager.autoplay) { player.UnPrepare(); + shouldHold = false; + } + } + else + { + if (PlayerInput.GetIsAction(InputAction_BasicRelease) && shouldHold && (!gameManager.autoplay) && !IsExpectingInputNow(InputAction_FlickRelease)) + { + if (doingPoses) + { + player.Pose(false); + SoundByte.PlayOneShotGame("theDazzles/miss"); + foreach (var girl in npcGirls) + { + girl.Ouch(); + } + } + else + { + player.UnPrepare(); + } + shouldHold = false; } - shouldHold = false; } - } - else if (!cond.isPlaying && !cond.isPaused) - { - if (queuedPoses.Count > 0) queuedPoses.Clear(); - if (queuedCrouches.Count > 0) queuedCrouches.Clear(); } } diff --git a/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset b/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset index 3fd3d805..31be55a4 100644 --- a/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset +++ b/ProjectSettings/SatorImaging.UnitySourceGenerator.Editor.ProjectSettingsData.asset @@ -24,5 +24,7 @@ MonoBehaviour: - Assets/Scripts/Games/FanClub/FanClub.cs - Assets/Scripts/GameManager.cs - Assets/Editor/SpritesheetScaler.cs + - Assets/Scripts/USG.g/LoadMinigames.Minigames.MinigameLoaderGenerator.g.cs + - Assets/Scripts/Games/TheDazzles/TheDazzles.cs PathsToSkipImportEvent: [] PathsToIgnoreOverwriteSettingOnAttribute: []