From 32181ae173aa26c4a3d5cab969ac5c2dbea9a83f Mon Sep 17 00:00:00 2001 From: Jiangqvweihuan <15987148+jiangqvweihuan@user.noreply.gitee.com> Date: Sun, 20 Jul 2025 03:03:32 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20Assets/s?= =?UTF-8?q?cripts/gamePlay=5Fgameplay/InputManager.cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/gamePlay_gameplay/InputManager.cs | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 Assets/scripts/gamePlay_gameplay/InputManager.cs diff --git a/Assets/scripts/gamePlay_gameplay/InputManager.cs b/Assets/scripts/gamePlay_gameplay/InputManager.cs deleted file mode 100644 index f4f5c5de..00000000 --- a/Assets/scripts/gamePlay_gameplay/InputManager.cs +++ /dev/null @@ -1,26 +0,0 @@ -using UnityEngine; -using System; - -public class InputManager : MonoBehaviour -{ - public static event Action OnKeyPressed; - public static event Action OnKeyReleased; - - private void Update() - { - foreach (string color in new string[] { "red", "green", "yellow", "purple", "blue" }) - { - KeyCode key = KeyBindingManager.GetKeyForColor(color); - if (key == KeyCode.None) continue; - - if (Input.GetKeyDown(key)) - { - OnKeyPressed?.Invoke(key); - // 调用 JudgeManager 统一判断最早的音符 - JudgeManager.Instance.JudgeEarliestNote(key); - } - if (Input.GetKeyUp(key)) - OnKeyReleased?.Invoke(key); - } - } -}