This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:guides:beginners:input_controls [2021/07/14 22:42 (3 years ago)] – iarwain | en:guides:beginners:input_controls [2021/07/14 22:57 (3 years ago)] (current) – iarwain | ||
---|---|---|---|
Line 18: | Line 18: | ||
This assigns labels to keys. These labels can be accessed in the code. | This assigns labels to keys. These labels can be accessed in the code. | ||
- | You can add code the Run() function to detect these keys. The Run() function is tied to the Orx core clock so the keys can be checked on every frame: | + | You can add code the Update() function to detect these keys. The Update() function is tied to the Orx core clock so the keys can be checked on every frame: |
< | < | ||
Line 77: | Line 77: | ||
orxVECTOR jumpSpeed = { 0, -600, 0 }; | orxVECTOR jumpSpeed = { 0, -600, 0 }; | ||
- | if (orxInput_IsActive(" | + | if (orxInput_HasBeenActivated(" |
{ | { | ||
orxObject_ApplyImpulse(hero, | orxObject_ApplyImpulse(hero, |