update pr

This commit is contained in:
Jare Guo
2016-05-11 13:52:53 +08:00
parent 612ad35614
commit dfad718bc8
2 changed files with 11 additions and 33 deletions
+10
View File
@@ -341,6 +341,16 @@ JS.mixin(cc.loader, {
* var texture = assets[0];
* var spriteFrame = assets[1];
* });
*
* // load all textures in "resources/imgs/"
* cc.loader.loadResAll('imgs', cc.Texture2D, function (err, textures) {
* if (err) {
* cc.error(err);
* return;
* }
* var texture1 = textures[0];
* var texture2 = textures[1];
* });
*/
loadResAll: function (url, type, completeCallback) {
if (!completeCallback && type && !cc.isChildClassOf(type, cc.RawAsset)) {
+1 -33
View File
@@ -46,19 +46,6 @@ function isMatchByWord (path, test) {
}
cc.js.mixin(AssetTable.prototype, {
///**
// * Check if the table contains a specific object. <br/>
// * <br/>
// * Note: All asset paths in Creator use forward slashes, paths using backslashes will not work.
// *
// * @method contains
// * @param {string} path - (not support wildcard)
// * @return {boolean}
// */
//contains: function (path) {
// return (path in this._pathToUuid);
//},
getUuid: function (path, type) {
path = cc.url.normalize(path);
@@ -127,15 +114,6 @@ cc.js.mixin(AssetTable.prototype, {
}
return uuids;
},
///**
// * Returns all asset paths in the table.
// * @method getAllPaths
// * @return {string[]}
// */
//getAllPaths: function () {
// return Object.keys(this._pathToUuid);
//},
/**
* @method add
@@ -175,17 +153,7 @@ cc.js.mixin(AssetTable.prototype, {
pathToUuid[path] = newEntry;
}
},
//_removeByPath: function (path) {
// delete this._pathToUuid[path];
//}
//_removeByUuid: function (uuid) {
// for (var path in this._pathToUuid) {
// if (this._pathToUuid[path] === uuid) {
// delete this._pathToUuid[path];
// return;
// }
// }
//}
reset: function () {
this._pathToUuid = {}
}