mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 10:32:39 +08:00
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:
@@ -3,6 +3,7 @@ var JS = cc.js;
|
||||
var AnimationManager = cc.Class({
|
||||
ctor: function () {
|
||||
this.animators = [];
|
||||
this.__instanceId = cc.ClassManager.getNewInstanceId();
|
||||
},
|
||||
|
||||
// for manager
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user