What does this line do?
if (Input.GetKeyDown(KeyCode.Space)) Jump();
- Jumps when the Space key is pressed
- Jumps continuously while Space is held
- Binds Space to the pause menu
- Disables jumping
GetKeyDown fires once on the frame the key goes down.
Play Game Dev ▸