Blending transition in cocos2d
Posted
by
fiddler
on Game Development
See other posts from Game Development
or by fiddler
Published on 2012-12-17T09:36:00Z
Indexed on
2012/12/17
11:14 UTC
Read the original article
Hit count: 282
cocos2d-iphone
|cocos2d
In my cocos2d-iphone game, I have 2 backgrounds (CCnodes), each containing a quite complex hierarchy of sprites.
I would like to make a smooth transition between them:
- initially, only the first background is visible
- at the end, only the second one is visible
Is there a good way to set the opacity of a full hierarchy of sprites ?
I tried to recursively set the opacity of all the contained sprites. It kinda works except that:
- i guess it's not very efficient
- i would like the opacity of overlapping sprites to be 'merged' (as if the background was one single big sprite)
© Game Development or respective owner