repaired the motherfucking hold note problem which troubled us longer than 2 months

added some UI
This commit is contained in:
FloatGaming
2025-08-02 00:28:35 +08:00
parent 373f0511e3
commit 774d3aeb7f
160 changed files with 5472 additions and 841 deletions
@@ -7,7 +7,7 @@ public class KeyBindingManager : MonoBehaviour
private void Awake()
{
//Debug.Log("KeyBindingManager Awake() 被调用,开始加载按键映射...");
Debug.Log("KeyBindingManager Awake() 被调用,开始加载按键映射...");
if (keyBindings.Count == 0)
{
@@ -15,18 +15,18 @@ public class KeyBindingManager : MonoBehaviour
}
}
/// <summary> 获取颜色对应的按键 </summary>
/// <summary> 获取颜色对应的按键 </summary>
public static KeyCode GetKeyForColor(string color)
{
if (keyBindings.TryGetValue(color.ToLower(), out KeyCode key))
{
return key;
}
//Debug.LogError($"未找到颜色 {color} 对应的按键!请检查 KeyBindingManager 是否正确初始化。");
Debug.LogError($"未找到颜色 {color} 对应的按键!请检查 KeyBindingManager 是否正确初始化。");
return KeyCode.None;
}
/// <summary> 修改按键绑定 </summary>
/// <summary> 修改按键绑定 </summary>
public static void ChangeKeyBinding(string color, KeyCode newKey)
{
if (keyBindings.ContainsKey(color.ToLower()))
@@ -41,7 +41,7 @@ public class KeyBindingManager : MonoBehaviour
SaveKeyBindings();
}
/// <summary> 存储按键绑定到 `PlayerPrefs` </summary>
/// <summary> 存储按键绑定到 `PlayerPrefs` </summary>
private static void SaveKeyBindings()
{
foreach (var kvp in keyBindings)
@@ -51,7 +51,7 @@ public class KeyBindingManager : MonoBehaviour
PlayerPrefs.Save();
}
/// <summary> 从 `PlayerPrefs` 加载按键绑定 </summary>
/// <summary> 从 `PlayerPrefs` 加载按键绑定 </summary>
private static void LoadKeyBindings()
{
string[] colors = { "red", "green", "yellow", "purple", "blue" };
@@ -69,6 +69,6 @@ public class KeyBindingManager : MonoBehaviour
}
}
//Debug.Log("KeyBindings 初始化成功:" + string.Join(", ", keyBindings));
Debug.Log("KeyBindings 初始化成功:" + string.Join(", ", keyBindings));
}
}