From ecc8bb0599fd22fb0243bf3c3658d52e2fd648de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AE=B6=E8=BE=89?= <35832931+ColinCollins@users.noreply.github.com> Date: Sat, 30 Jun 2018 20:29:00 +0800 Subject: [PATCH] test (#2910) --- cocos2d/core/CCDirector.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/cocos2d/core/CCDirector.js b/cocos2d/core/CCDirector.js index 1810b8c76a..2aadbaaa9b 100644 --- a/cocos2d/core/CCDirector.js +++ b/cocos2d/core/CCDirector.js @@ -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.';