Merge pull request #149 from 2youyouo2/master

fixed animation manager will be paused when node active is set to false
This commit is contained in:
Jare Guo
2015-12-29 13:36:58 +08:00
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -3,6 +3,7 @@ var JS = cc.js;
var AnimationManager = cc.Class({
ctor: function () {
this.animators = [];
this.__instanceId = cc.ClassManager.getNewInstanceId();
},
// for manager
+4 -4
View File
@@ -47,8 +47,8 @@ function callOnEnable (self, enable) {
self.onEnable();
}
}
cc.director.getScheduler().resumeTarget(this);
cc.director.getScheduler().resumeTarget(self);
_registerEvent(self, true);
@@ -66,7 +66,7 @@ function callOnEnable (self, enable) {
}
}
cc.director.getScheduler().pauseTarget(this);
cc.director.getScheduler().pauseTarget(self);
_registerEvent(self, false);
@@ -577,7 +577,7 @@ var Component = cc.Class({
isRunning: function () {
return this.enabledInHierarchy;
},
/**
* <p>Schedules a custom selector. <br/>
* If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.</p>