Merge pull request #1532 from pandamicro/v1.4

Fix cc.macro.REPEAT_FOREVER usage issue
This commit is contained in:
Wang Nan
2017-03-06 16:22:37 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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;
};