Hi everyone,
do you know if there is an easy way to pass some arguments to a function called via
haxe.Timer.delay(func, delay);
By "easy" I mean without creating any custom timer.
Thanks.
Hi everyone,
do you know if there is an easy way to pass some arguments to a function called via
haxe.Timer.delay(func, delay);
By "easy" I mean without creating any custom timer.
Thanks.
Use callback!
For example, if you want to call someFunction("abc")
:
haxe.Timer.delay(callback(someFunction,"abc"), 10);
With someone's advice I got:
var self = this;
haxe.Timer.delay(function {self.someFunction("abc");}, 10);
Any idea which one is the best?
Thank