Timer : Luxe.timer.reset() make physics not works
Opened this issue · 2 comments
The workflow of Luxe.timer.reset() maybe need to be review because when you do Luxe.timer.reset() all timer is reset, and game physics down because of this line :
https://github.com/underscorediscovery/luxe/blob/master/luxe/Physics.hx#L73
maybe an argument on Luxe.timer.reset(function) who function represent the function set on timer.schedule(time, function) that permit to reset specific timer?
One thing you can do is store the timer returned from a function like schedule()
- it returns a snow.api.Timer
which does have a stop()
function. (It would be nice to have a stop/pause/cancel on a luxe.Timer, though - agreed.)
Thanks for the report, that's a valid issue and you're both correct, the timer needs more control on it's instance and the reset call was shortsighted as an API. @Blist can you describe what you were trying to do, i.e your intent, so I can better understand why you were using this function in particular?