Contexts?

edited February 2012 in Help request
What's the "context" parameter in the orxClock functions for?

Comments

  • edited February 2012
    When you register a clock, you can pass in an item:

    orxClock_Register( Clock Object, Tick Function, <ItemGoesHere>, Module ID, Clock Priority );

    Whenever the tick function is called, the object you passed in at registration time will be available for use.


    I personally use this most often in my player-moving functions. Update their animations, do some hackish checks against user input, and move the object around, all without having to "find" the player first.
  • edited February 2012
    Seriously!? I wish I knew that ages ago!
  • edited February 2012
    You might want to re-read the tutorial #2 then. ;)
Sign In or Register to comment.