Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Timer : Luxe.timer.reset() make physics not works #366

Open
Blist opened this issue Mar 25, 2016 · 2 comments
Open

Timer : Luxe.timer.reset() make physics not works #366

Blist opened this issue Mar 25, 2016 · 2 comments

Comments

@Blist
Copy link

Blist commented Mar 25, 2016

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?

@jtruher
Copy link

jtruher commented Mar 25, 2016

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.)

@ruby0x1
Copy link
Member

ruby0x1 commented Jul 15, 2016

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants