“Unity Key Up” Ответ

Unity Key Up

//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)
Xombiehacker

Unity Key Up


Update is called -> GetKeyDown is true (this frame only) ->  isJumpPressed = true
Update is called -> GetKeyDown is false ->  isJumpPressed = false
FixedUpdate is called -> isJumpPressed is false 

Handsome Hedgehog

Ответы похожие на “Unity Key Up”

Вопросы похожие на “Unity Key Up”

Больше похожих ответов на “Unity Key Up” по C#

Смотреть популярные ответы по языку

Смотреть другие языки программирования