User Tools

Site Tools


en:guides:beginners:input_controls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:guides:beginners:input_controls [2021/07/14 22:42 (3 years ago)] iarwainen: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:
  
 <code=cpp> <code=cpp>
Line 77: Line 77:
 orxVECTOR jumpSpeed = { 0, -600, 0 }; orxVECTOR jumpSpeed = { 0, -600, 0 };
  
-if (orxInput_IsActive("Jump") && orxInput_HasNewStatus("Jump"))+if (orxInput_HasBeenActivated("Jump"))
 { {
     orxObject_ApplyImpulse(hero, &jumpSpeed, orxNULL);     orxObject_ApplyImpulse(hero, &jumpSpeed, orxNULL);
en/guides/beginners/input_controls.1626327734.txt.gz · Last modified: 2021/07/14 22:42 (3 years ago) by iarwain