mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix isScheduled bug for fireball/issues/4543
This commit is contained in:
@@ -778,7 +778,8 @@ cc.Scheduler = cc._Class.extend({
|
||||
cc.assert(callback, "Argument callback must not be empty");
|
||||
cc.assert(target, "Argument target must be non-nullptr");
|
||||
|
||||
var element = this._hashForUpdates[getTargetId(target)];
|
||||
var instanceId = getTargetId(target);
|
||||
var element = this._hashForTimers[instanceId];
|
||||
|
||||
if (!element){
|
||||
return false;
|
||||
@@ -791,7 +792,7 @@ cc.Scheduler = cc._Class.extend({
|
||||
for (var i = 0; i < timers.length; ++i){
|
||||
var timer = timers[i];
|
||||
|
||||
if (callback === timer.getKey()){
|
||||
if (callback === timer._selector){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user