From 7f68ad28c232107e3541b2874715fa746f07112d Mon Sep 17 00:00:00 2001 From: Braedon Date: Sat, 5 Feb 2022 15:28:04 -0500 Subject: [PATCH] Clappy trio input problem fixed --- Assets/Resources/Games/djSchool.prefab | 2 +- .../Games/ClappyTrio/ClappyTrioPlayer.cs | 40 +++---------------- Assets/Scripts/Games/DJSchool/Student.cs | 6 ++- 3 files changed, 11 insertions(+), 37 deletions(-) diff --git a/Assets/Resources/Games/djSchool.prefab b/Assets/Resources/Games/djSchool.prefab index 928456438..914dee3f7 100644 --- a/Assets/Resources/Games/djSchool.prefab +++ b/Assets/Resources/Games/djSchool.prefab @@ -197,7 +197,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 54588eb7ee0680643aeaf61dcf609903, type: 3} m_Name: m_EditorClassIdentifier: - time: 0.04 + time: 0.01 --- !u!1 &2570987087158414682 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs index 5516f253f..04b93649a 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrioPlayer.cs @@ -38,36 +38,10 @@ namespace RhythmHeavenMania.Games.ClappyTrio private void Update() { - if (PlayerInput.Pressed()) - { - Clap(false); - } - if (clapVacant == true) { float normalizedBeat = (Conductor.instance.GetPositionFromBeat(lastClapBeat, lastClapLength)); - /*if (normalizedBeat > Minigame.EarlyTime() && normalizedBeat < Minigame.PerfectTime() && lastIndex == 0) - { - SetEligibility(true, false, false); - lastIndex++; - } - else if (normalizedBeat > Minigame.PerfectTime() && normalizedBeat < Minigame.LateTime() && lastIndex == 1) - { - SetEligibility(false, true, false); - // Clap(); - lastIndex++; - } - else if (normalizedBeat > Minigame.LateTime() && lastIndex == 2) - { - SetEligibility(false, false, true); - clapVacant = false; - lastIndex = 0; - lastClapLength = 0; - lastClapBeat = 0; - hit = false; - }*/ - StateCheck(normalizedBeat); if (normalizedBeat > Minigame.LateTime()) @@ -78,15 +52,13 @@ namespace RhythmHeavenMania.Games.ClappyTrio lastClapBeat = 0; } } - } - /*public void ClearLog() - { - var assembly = System.Reflection.Assembly.GetAssembly(typeof(UnityEditor.Editor)); - var type = assembly.GetType("UnityEditor.LogEntries"); - var method = type.GetMethod("Clear"); - method.Invoke(new object(), null); - }*/ + if (PlayerInput.Pressed()) + { + Clap(false); + } + + } public void SetClapAvailability(float startBeat, float length) { diff --git a/Assets/Scripts/Games/DJSchool/Student.cs b/Assets/Scripts/Games/DJSchool/Student.cs index 10e22412b..8fe7b805c 100644 --- a/Assets/Scripts/Games/DJSchool/Student.cs +++ b/Assets/Scripts/Games/DJSchool/Student.cs @@ -44,7 +44,7 @@ namespace RhythmHeavenMania.Games.DJSchool { Hold(true); } - else if (state.notPerfect()) + else { Hold(false); } @@ -64,7 +64,7 @@ namespace RhythmHeavenMania.Games.DJSchool { Swipe(); } - else if (state.notPerfect()) + else { UnHold(); } @@ -89,6 +89,8 @@ namespace RhythmHeavenMania.Games.DJSchool public void UnHold() { + isHolding = false; + anim.speed = -1; anim.Play("Hold", 0, 0);