加入了浮动小游戏功能和设置界面

运行时请手动修改运行库目录fdBrowser
This commit is contained in:
FloatGaming
2025-12-24 06:02:06 +08:00
parent 1ab80e504e
commit eb9b6ba78a
1131 changed files with 148096 additions and 313 deletions
@@ -49,6 +49,12 @@ public class InputManager : MonoBehaviour
}
}
private void Start()
{
// Ensure UI shows current bindings from KeyBindingManager/PlayerPrefs
RefreshKeyLabels();
}
private void Update()
{
foreach (string color in new string[] { "red", "green", "yellow", "purple", "blue" })
@@ -87,6 +93,20 @@ public class InputManager : MonoBehaviour
}
}
// Refresh displayed labels for key bindings (called after rebind)
public void RefreshKeyLabels()
{
string[] colors = new string[] { "red", "green", "yellow", "purple", "blue" };
if (trackKeyTexts == null) return;
for (int i = 0; i < colors.Length && i < trackKeyTexts.Length; i++)
{
var txt = trackKeyTexts[i];
if (txt == null) continue;
KeyCode k = KeyBindingManager.GetKeyForColor(colors[i]);
txt.text = KeyBindingManager.GetDisplayName(k);
}
}
private int GetIndexForColor(string color)
{
// 保持与 trackJudgeTexts 相同的索引映射