summary refs log tree commit diff stats
path: root/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Classes')
-rwxr-xr-xClasses/Cart_CollectAppDelegate.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Classes/Cart_CollectAppDelegate.m b/Classes/Cart_CollectAppDelegate.m index 1a6759c..25a2aa4 100755 --- a/Classes/Cart_CollectAppDelegate.m +++ b/Classes/Cart_CollectAppDelegate.m
@@ -134,6 +134,13 @@
134 134
135- (void)applicationWillResignActive:(UIApplication *)application { 135- (void)applicationWillResignActive:(UIApplication *)application {
136 [[CCDirector sharedDirector] pause]; 136 [[CCDirector sharedDirector] pause];
137
138 [[NSUserDefaults standardUserDefaults] synchronize];
139
140 if ([[CCDirector sharedDirector] runningScene].tag == GAME_SCENE)
141 {
142 [((GameMode*)[[[CCDirector sharedDirector] runningScene] getChildByTag:GAME_LAYER]) pause];
143 }
137} 144}
138 145
139- (void)applicationDidBecomeActive:(UIApplication *)application { 146- (void)applicationDidBecomeActive:(UIApplication *)application {
@@ -146,13 +153,6 @@
146 153
147-(void) applicationDidEnterBackground:(UIApplication*)application { 154-(void) applicationDidEnterBackground:(UIApplication*)application {
148 [[CCDirector sharedDirector] stopAnimation]; 155 [[CCDirector sharedDirector] stopAnimation];
149
150 [[NSUserDefaults standardUserDefaults] synchronize];
151
152 if ([[CCDirector sharedDirector] runningScene].tag == GAME_SCENE)
153 {
154 [((GameMode*)[[[CCDirector sharedDirector] runningScene] getChildByTag:GAME_LAYER]) pause];
155 }
156} 156}
157 157
158-(void) applicationWillEnterForeground:(UIApplication*)application { 158-(void) applicationWillEnterForeground:(UIApplication*)application {