cocos2d-x pause game on background with pause screen -
I'm trying to figure out how to implement a break screen on the background I have a dispute game in my game scene Is a method called. I set it up so that users can click the pause button while playing and ask in the menu whether they want to resume or go to the main menu. Now when the phone goes in the background, I want to call it on the same function in my game view so that the menu can be shown so that when the user app comes back, they start it automatically instead of starting Will be able to. I am now rounding for hours and trying for some things, but the only thing that I am able to do, is to stop the app representative from calling the director. Whatever is happening is happening in some way, but I have to call the break game method of my game scene. Is there any such program that I can listen to for the game's play or there is a way to call a break from my ActionLigate. I just can not seem to find an answer for this sentence.
App representative has this function, void app deliitte :: applicationDebtbrackground ()
, which every time the app enters the background.
You can use the current view by using this,
-
directive: getInstance () - & gt; GetRunningScene ();
cocos2d-x 3.0 -
ccccentor :: share instances () - & gt; GetRunningScene ();
cocos2d-x 2.x // is not entirely certain for syntax,
After importing the right typcasting and appropriate header files, you can call the required function call from here can do.
Comments
Post a Comment