📜  unity key up - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:57.850000             🧑  作者: Mango

代码示例1
//returns bool
//true if key was up last frame, but now is pressed
Input.GetKeyDown(KeyCode.Space)
//true while key is not pressed (key is up)
Input.GetKeyUp(KeyCode.Space)
//true while key is down
Input.GetKey(KeyCode.Space)