Closed breathxue closed 10 years ago
Hi,breathxue. You must enabled the cascade opacity,like:
SpriteA.setCascadeOpacityEnabled(true);
Hi, xingsenma thank you for you help. I test it, but I found new issue
SpriteA.addChild(SpriteB)
SpriteB.addChild(SpriteC)
//SpriteB.setCascadeOpacityEnabled(true) // SpriteB also setCascadeOpacityEnabled, it`s hard to used
SpriteA.setCascadeOpacityEnabled(true)
SpriteA.setOpacity(127);
SpriteA.setCascadeOpacityEnabled(true)
SpriteA.addChild(SpriteB)
SpriteA.setOpacity(127);
//run right
SpriteA.addChild(SpriteC)
//SpriteC not transparency
SpriteA.setOpacity(127);
//must setOpacity again
Hi,
This bug has been fixed at: https://github.com/cocos2d/cocos2d-html5/pull/1478/files
Thanks for feedback.
thank you very mush
Father Node setOpacity can not Superimposed to Child Node?
SpriteA.addChild(SpriteB) SpriteA.setOpacity(127);
But SpriteB does not seem transparent
father node setCascadeOpacityEnabled can not Superimposed to grandson node
If new Child add in Father Node, you must reset Opacity, But same problem did not appear in LayerColor.