diff --git a/jsb/jsb-etc.js b/jsb/jsb-etc.js index 93dafcce0b..30d6ce1a18 100644 --- a/jsb/jsb-etc.js +++ b/jsb/jsb-etc.js @@ -91,6 +91,22 @@ cc.Scheduler.prototype.unschedule = function (callback, target) { var key = instanceId + '_' + callback.__callbackId; this._unschedule(key, target); }; +cc.Scheduler.prototype._isScheduled = cc.Scheduler.prototype.isScheduled; +cc.Scheduler.prototype.isScheduled = function (callback, target) { + if (typeof target === 'function') { + var tmp = target; + target = callback; + callback = tmp; + } + if (callback.__callbackId === undefined) { + return; + } + + var instanceId = target.__instanceId || target.uuid; + cc.assertID(instanceId !== undefined, 1510); + var key = instanceId + '_' + callback.__callbackId; + this._isScheduled(key, target); +}; // Node var nodeProto = cc.Node.prototype;