📜  unity key down - C# 代码示例

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

代码示例5
//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)