“Einheitschlüssel” Code-Antworten

Einheitschlüssel

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

Einheitschlüssel


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

Ähnliche Antworten wie “Einheitschlüssel”

Fragen ähnlich wie “Einheitschlüssel”

Weitere verwandte Antworten zu “Einheitschlüssel” auf C#

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen