onTimer callback vs. recursive scheduling?
by Man-Machine · in Torque Game Builder · 04/09/2009 (1:12 pm) · 3 replies
onTimer callback vs. recursive scheduling?
What are the pros and cons of this two methods when I'm trying to update an object every second?
Does it make any difference which method I choose? I'm not sure what's happening underneath in the engine...
What are the pros and cons of this two methods when I'm trying to update an object every second?
Does it make any difference which method I choose? I'm not sure what's happening underneath in the engine...
#2
04/10/2009 (9:45 am)
onTimer is cleaner. If you use schedule calls everywhere, you can very quickly turn it into a nightmare to manage. Using onTimer will force you to keep things centralized in one callback, which I promise you'll appreciate later on. :)
Associate Phillip O'Shea
Violent Tulip
Just go with onTimer, its nice and easy to get set up.