This commit is contained in:
黄家辉
2018-06-30 20:29:00 +08:00
committed by pandamicro
parent c7603a1c63
commit ecc8bb0599
+9 -13
View File
@@ -598,19 +598,15 @@ cc.Director.prototype = {
if (info) {
this.emit(cc.Director.EVENT_BEFORE_SCENE_LOADING, sceneName);
cc.loader.load({ uuid: info.uuid, type: 'uuid' },
function (completedCount, totalCount, item) {
if (onProgress) {
onProgress(completedCount, totalCount, item);
}
},
function (error, asset) {
if (error) {
cc.errorID(1210, sceneName, error.message);
}
if (onLoaded) {
onLoaded(error, asset);
}
});
onProgress,
function (error, asset) {
if (error) {
cc.errorID(1210, sceneName, error.message);
}
if (onLoaded) {
onLoaded(error, asset);
}
});
}
else {
var error = 'Can not preload the scene "' + sceneName + '" because it is not in the build settings.';