diff --git a/cocos2d/core/CCDirector.js b/cocos2d/core/CCDirector.js index a62284d395..aadfe24eab 100644 --- a/cocos2d/core/CCDirector.js +++ b/cocos2d/core/CCDirector.js @@ -467,9 +467,8 @@ cc.Director = Class.extend(/** @lends cc.Director# */{ * Run a scene. Replaces the running scene with a new one or enter the first scene. * @method runScene * @param {Scene} scene - The need run scene. - * @param {Function} [onBeforeLoadScene] - The function at the scene before loading. */ - runScene: function (scene, onBeforeLoadScene) { + runScene: function (scene, _onBeforeLoadScene) { cc.assert(scene, cc._LogInfos.Director.pushScene); // detach persist nodes @@ -492,8 +491,8 @@ cc.Director = Class.extend(/** @lends cc.Director# */{ // purge destroyed nodes belongs to old scene cc.Object._deferredDestroy(); - if (onBeforeLoadScene) { - onBeforeLoadScene(); + if (_onBeforeLoadScene) { + _onBeforeLoadScene(); } this.emit(cc.Director.EVENT_BEFORE_SCENE_LAUNCH, scene); @@ -544,10 +543,9 @@ cc.Director = Class.extend(/** @lends cc.Director# */{ * @method loadScene * @param {String} sceneName - The name of the scene to load. * @param {Function} [onLaunched] - callback, will be called after scene launched. - * @param {Function} [onUnloaded] - callback, will be called when the previous scene was unloaded. * @return {Boolean} if error, return false */ - loadScene: function (sceneName, onLaunched, onUnloaded) { + loadScene: function (sceneName, onLaunched, _onUnloaded) { var uuid, info; if (this._loadingScene) { cc.error('[loadScene] Failed to load scene "%s" because "%s" is already loading', sceneName, this._loadingScene); @@ -582,7 +580,7 @@ cc.Director = Class.extend(/** @lends cc.Director# */{ } if (uuid) { this._loadingScene = sceneName; - this._loadSceneByUuid(uuid, onLaunched, onUnloaded); + this._loadSceneByUuid(uuid, onLaunched, _onUnloaded); return true; } else { diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index c6fb91c224..37236fd59d 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -1089,24 +1089,38 @@ if (cc.sys.isNative) { /** * @event position-changed + * @param {cc.Event} event + * @param {cc.Vec2} event.detail - old position */ /** * @event rotation-changed + * @param {cc.Event} event + * @param {Number} event.detail - old rotation x */ /** * @event scale-changed + * @param {cc.Event} event + * @param {cc.Vec2} event.detail - old scale */ /** * @event size-changed + * @param {cc.Event} event + * @param {cc.Size} event.detail - old size */ /** * @event anchor-changed + * @param {cc.Event} event + * @param {cc.Vec2} event.detail - old anchor */ /** * @event color-changed + * @param {cc.Event} event + * @param {cc.Color} event.detail - old color */ /** * @event opacity-changed + * @param {cc.Event} event + * @param {Number} event.detail - old opacity */ Node.EventType = EventType; diff --git a/cocos2d/core/components/CCCanvas.js b/cocos2d/core/components/CCCanvas.js index 3973ca7f22..9deedd5cbb 100644 --- a/cocos2d/core/components/CCCanvas.js +++ b/cocos2d/core/components/CCCanvas.js @@ -61,6 +61,7 @@ var Canvas = cc.Class({ /** * Current active canvas, the scene should only have one active canvas at the same time. * @property {Canvas} instance + * @static */ instance: null }, diff --git a/cocos2d/core/platform/CCClass.js b/cocos2d/core/platform/CCClass.js index 44fd2b303a..584a52a4ac 100644 --- a/cocos2d/core/platform/CCClass.js +++ b/cocos2d/core/platform/CCClass.js @@ -218,16 +218,6 @@ var _metaClass = { if (CC_DEV) { Object.defineProperty(this.prototype, name, { - //set: function setter_editorWrapper (value) { - // if (this._observing) { - // Object.getNotifier(this).notify({ - // type: 'update', - // name: name, - // oldValue: this[name] - // }); - // } - // setter.call(this, value); - //}, set: setter, configurable: true, enumerable: true