Friday, April 17, 2015

Cocos2D-X FadeIn and FadeOut Not Applying to Children of a Sprite

The default behaviour for Cocos2D-X during a FadeIn / FadeOut action is that the only the Sprite will fade in/out, and if it has children, they will be unaffected.

In order for a FadeIn / FadeOut action to apply to the children of a Sprite, call "setCascadeOpacityEnabled(true)" on the parent Sprite.

Reference: http://discuss.cocos2d-x.org/t/fadein-and-fadeout-does-not-apply-to-children-even-in-3-3-final/19079

No comments:

Post a Comment