|
55 | 55 | */ |
56 | 56 | - (void)savePackages; |
57 | 57 |
|
| 58 | +/** |
| 59 | + * Returns a package identified by name. Resolution and OS are determined implicitly. |
| 60 | + * |
| 61 | + * @param name Name of the package |
| 62 | + */ |
| 63 | +- (CCPackage *)packageWithName:(NSString *)name; |
58 | 64 |
|
59 | 65 | /** |
60 | 66 | * The all inclsuive method to add a package to your app. |
61 | 67 | * Returns a new package immediately which will be downloaded, unzipped and installed asynchronously to the Packages folder in /Library/Caches (default) |
| 68 | + * OS and resolution are determined implicitly. Resolution is derived from CCFileUtils' searchResolutionsOrder first entry. |
62 | 69 | * |
63 | 70 | * If a package with the same name and resolution already exists it won't be rescheduled for downloading. |
64 | 71 | * If you need to update a package by re-downloading it you will have to delete it first. |
|
67 | 74 | * The URL is determined by the baseURL property and the standard identifier created by the name, os and resolution. |
68 | 75 | * Example: base is http://foo, name: DLC, os: iOS (determined by manager), resolution: phonehd => http://foo/DLC-iOS-phonehd.zip |
69 | 76 | * |
| 77 | + * @param name Name of the package |
| 78 | + * @param enableAfterDownload If the package should be enabled in cocos2d after download. You can enable it with the enablePackage: method later on. |
| 79 | + */ |
| 80 | +- (CCPackage *)downloadPackageWithName:(NSString *)name enableAfterDownload:(BOOL)enableAfterDownload; |
| 81 | + |
| 82 | +/** |
| 83 | + * Like the method above. Instead of using the baseURL, name and resolution you can provide the URL directly. |
| 84 | + * Returns a new package immediately which will be downloaded, unzipped and installed asynchronously to the Packages folder in /Library/Caches (default) |
| 85 | + * OS is determined implicitly. |
| 86 | + * |
70 | 87 | * @param name Name of the package |
71 | 88 | * @param resolution Resolution of the package, e.g. phonehd, tablethd etc. |
72 | 89 | * @param enableAfterDownload If the package should be enabled in cocos2d after download. You can enable it with the enablePackage: method later on. |
73 | 90 | */ |
74 | 91 | - (CCPackage *)downloadPackageWithName:(NSString *)name resolution:(NSString *)resolution enableAfterDownload:(BOOL)enableAfterDownload; |
75 | 92 |
|
| 93 | +/** |
| 94 | + * Like the method above. Instead of using the baseURL and name you can provide the URL directly. |
| 95 | + * OS and resolution are determined implicitly. Resolution is derived from CCFileUtils' searchResolutionsOrder first entry. |
| 96 | + * |
| 97 | + * @param name Name of the package |
| 98 | + * @param remoteURL URL of the package to be downloaded |
| 99 | + * @param enableAfterDownload If the package should be enabled in cocos2d after download. You can enable it with the enablePackage: method later on. |
| 100 | + */ |
| 101 | +- (CCPackage *)downloadPackageWithName:(NSString *)name remoteURL:(NSURL *)remoteURL enableAfterDownload:(BOOL)enableAfterDownload; |
| 102 | + |
76 | 103 | /** |
77 | 104 | * Like the method above. Instead of using the baseURL, name and resolution you can provide the URL directly. |
| 105 | + * OS is determined implicitly. |
78 | 106 | * |
79 | 107 | * @param name Name of the package |
80 | 108 | * @param resolution Resolution of the package, e.g. phonehd, tablethd etc. |
|
0 commit comments