From 861aca4004ca74f421fdfb4955738c99bd21b9fd Mon Sep 17 00:00:00 2001 From: dingpinglv Date: Tue, 23 Oct 2012 17:10:31 +0800 Subject: [PATCH] fixed #1509 correct Scheduler's bug --- cocos2d/CCScheduler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cocos2d/CCScheduler.js b/cocos2d/CCScheduler.js index c1c26f5825..64ee48628e 100644 --- a/cocos2d/CCScheduler.js +++ b/cocos2d/CCScheduler.js @@ -490,6 +490,8 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{ //update hash entry for quick access var hashElement = new cc.HashUpdateEntry(ppList, listElement, target, null); this._hashForUpdates.push(hashElement); + + return ppList; }, _appendIn:function (ppList, target, paused) { @@ -694,10 +696,10 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{ if (priority == 0) { this._appendIn(this._updates0List, target, paused); } else if (priority < 0) { - this._priorityIn(this._updatesNegList, target, priority, paused); + this._updatesNegList = this._priorityIn(this._updatesNegList, target, priority, paused); } else { // priority > 0 - this._priorityIn(this._updatesPosList, target, priority, paused); + this._updatesPosList = this._priorityIn(this._updatesPosList, target, priority, paused); } },