mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
active must synchronize to component
This commit is contained in:
@@ -2460,6 +2460,15 @@ var Node = cc.Class({
|
||||
var self = this;
|
||||
var sgNode = self._sgNode;
|
||||
|
||||
// `active` must synchronize to component
|
||||
for (var i=0; i<this._components.length; i++) {
|
||||
var comp = this._components[i];
|
||||
if (!comp || !comp._sgNode) {
|
||||
continue;
|
||||
}
|
||||
comp._sgNode.visible = this.active;
|
||||
}
|
||||
|
||||
sgNode.setPosition(self._position);
|
||||
sgNode.setRotationX(self._rotationX);
|
||||
sgNode.setRotationY(self._rotationY);
|
||||
@@ -2529,7 +2538,6 @@ var Node = cc.Class({
|
||||
}
|
||||
}
|
||||
}
|
||||
sizeProvider.visible = this.active;
|
||||
}
|
||||
|
||||
var sgParent = this._parent && this._parent._sgNode;
|
||||
|
||||
Reference in New Issue
Block a user