-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Time scale #266
Comments
Hi Tomas, Do you use the Juggler? You could do something like this:
Now you use this juggler for all your animations. You can also change the the "speed" property to change the speed of the playback. |
Btw. this is the prefered technique to implement a "pause" button. You use your own instance of Juggler and if you want to pause the game, you just remove your juggler from the main juggler.
|
Good tip, thanks! I don't like keeping my own reference to my specialised Juggler, because anyone can call "stage.juggler" and "escape my time scale". Please consider allowing me to create RenderLoop instance with my own "root" Juggler in constructor. In my case I have overridden RenderLoop itself so I can have this "time scale" behaviour global. (My UI isn't in StageXL, so I don't need any exceptions from this global time scale, and I want to make sure that everything respect it.) Anyway, thanks again! |
Hi!
I would like to have "double timeScale" property in RenderLoop. I want player to be able to speed game up or slow it down. It seems to me that this would be pretty straight forward change. Right here:
https://github.com/bp74/StageXL/blob/master/lib/src/display/render_loop.dart#L47
Just multiply deltaTime by timeScale, IMHO.
The text was updated successfully, but these errors were encountered: