-
Notifications
You must be signed in to change notification settings - Fork 123
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
Resume calls OnEnter but not balanced with OnExit #273
Comments
This may be a phenomenon of MonoGame. |
This also happens on WP7. Open the game, click the windows button, note the onExit is not called. Resume the game (back button), note OnEnter is called. |
The problem is from using CCDirector.ResumeFromBackground() which calls onEnter on the top scene when it is not a transition scene. |
As you can see, the pause() method does not call OnExit, but the ResumeFromBackground does call OnEnter
|
Pause () terminates the call is shedule Update () only |
Need a pair call, for example EnterToBackground, that would make a pause, and caused OnExit |
the latest version of cocos2d-x is not ResumeFromBackground in CCDirector. |
ResumeFromBackground was added by me. It needs a balancing method, or to be removed. I forget why I added it and did not document why it was added. |
When the game pauses, the current scene and its children do not receive an OnExit call. Yet, when the game resumes, the scene graph receives an OnEnter call. This causes an imbalance in any state that may change during OnEnter that would otherwise be balanced by OnExit.
The text was updated successfully, but these errors were encountered: