mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
Fix cc.macro.REPEAT_FOREVER usage issue
This commit is contained in:
@@ -183,7 +183,7 @@ cc.js.mixin(CallbackTimer.prototype, {
|
||||
this._delay = delay;
|
||||
this._useDelay = (this._delay > 0);
|
||||
this._repeat = repeat;
|
||||
this._runForever = (this._repeat === cc.REPEAT_FOREVER);
|
||||
this._runForever = (this._repeat === cc.macro.REPEAT_FOREVER);
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ window.setInterval = function (code, delay) {
|
||||
var target = new WindowTimeFun(code);
|
||||
if (arguments.length > 2)
|
||||
target._args = Array.prototype.slice.call(arguments, 2);
|
||||
cc.director.getScheduler()._schedule(target.fun, target, delay / 1000, cc.REPEAT_FOREVER, 0, false, target._intervalId+'');
|
||||
cc.director.getScheduler()._schedule(target.fun, target, delay / 1000, cc.macro.REPEAT_FOREVER, 0, false, target._intervalId+'');
|
||||
_windowTimeFunHash[target._intervalId] = target;
|
||||
return target._intervalId;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user