👂👂👂👂👂👂
代码:
publicKeyCodegetKeyDownCode() { if (Input.anyKeyDown) { foreach (KeyCodekeyCodeinEnum.GetValues(typeof(KeyCode))) { if (Input.GetKeyDown(keyCode)) { Debug.Log(keyCode.ToString()); returnkeyCode; } } } returnKeyCode.None; }
👂👂👂👂👂👂
代码:
publicKeyCodegetKeyDownCode() { if (Input.anyKeyDown) { foreach (KeyCodekeyCodeinEnum.GetValues(typeof(KeyCode))) { if (Input.GetKeyDown(keyCode)) { Debug.Log(keyCode.ToString()); returnkeyCode; } } } returnKeyCode.None; }