File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ - (void)loadPackages
77
77
78
78
[self restartUnzippingTasks ];
79
79
80
+ CCLOGINFO (@" [PACKAGES] Packages loaded (%u ): %@ " , _packages.count , _packages);
81
+
80
82
self.initialized = YES ;
81
83
}
82
84
Original file line number Diff line number Diff line change 34
34
#import " CCGLView.h"
35
35
36
36
#import " OALSimpleAudio.h"
37
+ #import " CCPackageManager.h"
37
38
38
39
#if __CC_METAL_SUPPORTED_AND_ENABLED
39
40
#import " CCMetalView.h"
@@ -261,6 +262,8 @@ - (void) setupCocos2dWithOptions:(NSDictionary*)config
261
262
262
263
// make main window visible
263
264
[window_ makeKeyAndVisible ];
265
+
266
+ [[CCPackageManager sharedManager ] loadPackages ];
264
267
}
265
268
266
269
// getting a call, pause the game
@@ -282,6 +285,8 @@ -(void) applicationDidEnterBackground:(UIApplication*)application
282
285
{
283
286
if ( [navController_ visibleViewController ] == [CCDirector sharedDirector ] )
284
287
[[CCDirector sharedDirector ] stopAnimation ];
288
+
289
+ [[CCPackageManager sharedManager ] savePackages ];
285
290
}
286
291
287
292
-(void ) applicationWillEnterForeground : (UIApplication*)application
@@ -294,12 +299,16 @@ -(void) applicationWillEnterForeground:(UIApplication*)application
294
299
- (void )applicationWillTerminate : (UIApplication *)application
295
300
{
296
301
[[CCDirector sharedDirector ] end ];
302
+
303
+ [[CCPackageManager sharedManager ] savePackages ];
297
304
}
298
305
299
306
// purge memory
300
307
- (void )applicationDidReceiveMemoryWarning : (UIApplication *)application
301
308
{
302
309
[[CCDirector sharedDirector ] purgeCachedData ];
310
+
311
+ [[CCPackageManager sharedManager ] savePackages ];
303
312
}
304
313
305
314
// next delta time will be zero
You can’t perform that action at this time.
0 commit comments