mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5456 from andyque/fixbug3801
closed #3801: State is changed to RESUME when game comes back to foreground if pause button was clicked in Interval Test
This commit is contained in:
commit
2beacc21c9
|
@ -88,14 +88,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->pause(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->resume(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
|
@ -91,14 +91,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->pause(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->resume(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
|
@ -90,14 +90,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->pause(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->resume(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
|
@ -88,14 +88,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->pause(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
/* cocos2d::Director::getInstance()->resume(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
|
@ -95,14 +95,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
// cocos2d::Director::getInstance()->pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
// cocos2d::Director::getInstance()->resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
|
@ -91,14 +91,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
// cocos2d::Director::getInstance()->pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
// cocos2d::Director::getInstance()->resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
|
@ -89,14 +89,16 @@ static AppDelegate s_sharedApplication;
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->pause();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
// cocos2d::Director::getInstance()->pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
*/
|
*/
|
||||||
cocos2d::Director::getInstance()->resume();
|
//We don't need to call this method any more. It will interupt user defined game pause&resume logic
|
||||||
|
// cocos2d::Director::getInstance()->resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
|
|
Loading…
Reference in New Issue