成就系统 巨大修改 新的ui 黑白效果 等一堆
This commit is contained in:
@@ -93,6 +93,29 @@ public class InputManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force a release event for all bound keys and reset UI indicators.
|
||||
/// Useful for external "clear input" operations where the system should treat
|
||||
/// all keys as released regardless of physical state.
|
||||
/// </summary>
|
||||
public void ForceReleaseAllKeys()
|
||||
{
|
||||
string[] colors = new string[] { "red", "green", "yellow", "purple", "blue" };
|
||||
foreach (var color in colors)
|
||||
{
|
||||
KeyCode key = KeyBindingManager.GetKeyForColor(color);
|
||||
if (key == KeyCode.None) continue;
|
||||
try { OnKeyReleased?.Invoke(key); } catch { }
|
||||
|
||||
int index = GetIndexForColor(color);
|
||||
if (trackKeyTexts != null && index >= 0 && index < trackKeyTexts.Length)
|
||||
{
|
||||
var txt = trackKeyTexts[index];
|
||||
if (txt != null) txt.color = keyInactiveColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh displayed labels for key bindings (called after rebind)
|
||||
public void RefreshKeyLabels()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user