From 8a710bda6d7618adc16b5ae4f116ba83cdd07273 Mon Sep 17 00:00:00 2001 From: Ron Yeh Date: Sun, 2 Oct 2016 02:03:10 -0700 Subject: [PATCH 1/3] doEnumerateRecursive(node, name, callback) now returns the return value. --- cocos2d/core/base-nodes/CCNode.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos2d/core/base-nodes/CCNode.js b/cocos2d/core/base-nodes/CCNode.js index a5df64d76e..f31e704a47 100644 --- a/cocos2d/core/base-nodes/CCNode.js +++ b/cocos2d/core/base-nodes/CCNode.js @@ -2513,6 +2513,7 @@ cc.Node = cc.Class.extend(/** @lends cc.Node# */{ } } } + return ret; }, doEnumerate: function(name, callback){ From d7f91d694d0f0b23b38dbef135a99ab25da597c1 Mon Sep 17 00:00:00 2001 From: Ron Yeh Date: Sun, 2 Oct 2016 15:10:07 -0700 Subject: [PATCH 2/3] Fix typos in comments and function name. --- cocos2d/actions/CCAction.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos2d/actions/CCAction.js b/cocos2d/actions/CCAction.js index bc4dccff85..8e823805b4 100644 --- a/cocos2d/actions/CCAction.js +++ b/cocos2d/actions/CCAction.js @@ -185,7 +185,7 @@ cc.Action = cc.Class.extend(/** @lends cc.Action# */{ }, /** - * Currently JavaScript Bindigns (JSB), in some cases, needs to use retain and release. This is a bug in JSB,
+ * Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB,
* and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.
* This is a hack, and should be removed once JSB fixes the retain/release bug. */ @@ -193,7 +193,7 @@ cc.Action = cc.Class.extend(/** @lends cc.Action# */{ }, /** - * Currently JavaScript Bindigns (JSB), in some cases, needs to use retain and release. This is a bug in JSB,
+ * Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB,
* and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.
* This is a hack, and should be removed once JSB fixes the retain/release bug. */ @@ -238,7 +238,7 @@ cc.Action.create = cc.action; * @extends cc.Action */ cc.FiniteTimeAction = cc.Action.extend(/** @lends cc.FiniteTimeAction# */{ - //! duration in seconds + // duration in seconds _duration:0, /** @@ -562,7 +562,7 @@ cc.Follow = cc.Action.extend(/** @lends cc.Follow# */{ * * @param {Boolean} value */ - setBoudarySet:function (value) { + setBoundarySet:function (value) { this._boundarySet = value; }, From b957fb195f16615b604a5e187f2fc9567b50b57e Mon Sep 17 00:00:00 2001 From: Ron Yeh Date: Thu, 6 Oct 2016 01:41:59 -0700 Subject: [PATCH 3/3] Fix bug where PRIORITY_NON_SYSTEM is NaN. Moved the constant into the cc.Scheduler namespace for consistency with PRIORITY_SYSTEM. --- cocos2d/core/CCScheduler.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cocos2d/core/CCScheduler.js b/cocos2d/core/CCScheduler.js index 4075d970d2..7cb91e69ce 100644 --- a/cocos2d/core/CCScheduler.js +++ b/cocos2d/core/CCScheduler.js @@ -25,12 +25,6 @@ ****************************************************************************/ -/** - * Minimum priority level for user scheduling. - * @constant - * @type Number - */ -cc.PRIORITY_NON_SYSTEM = cc.PRIORITY_SYSTEM + 1; //data structures /** @@ -1029,9 +1023,17 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{ this.unscheduleAllWithMinPriority(minPriority); } }); + /** * Priority level reserved for system services. * @constant * @type Number */ cc.Scheduler.PRIORITY_SYSTEM = (-2147483647 - 1); + +/** + * Minimum priority level for user scheduling. + * @constant + * @type Number + */ +cc.Scheduler.PRIORITY_NON_SYSTEM = cc.Scheduler.PRIORITY_SYSTEM + 1;