Hi everyone,
I am using
TweenLite.ticker.addEventListener("tick", updateGameState);
to update the state of my game. The updateGameState function is called as it should be but when I leave the game screen and remove the listener using
TweenLite.ticker.removeEventListener("tick", updateGameState);
the ticker continues to tick and the time / frames continue to count. When I re-register my updateGameState function to the ticker then the current time is not zero. I would like to stop or pause the ticker while I leave / enter the game screen, in order to keep track of the game state.
Is there a way to do this? Or am I to the wrong path?