I want to replace one scene with another with fade out - fade in effect.(old scene fades out(to the black screen),and then new scene fades in).
i found solution manually to decrease opacity of one scene and then launch
[[CCDirector sharedDirector] replaceScene:[HelloWorld scene]];
开发者_开发问答But i suppose there is another solution with the use of actions. Please, help me)
I found the answer in this tutorial http://www.bit-101.com/blog/?p=2143!
You’ll find all the transitions listed in the Transitions.h file in the cocos2d folder.
[[Director sharedDirector] replaceScene:[RotoZoomTransition transitionWithDuration:1.0 scene:[PlayScene node]]];
I'm no expert on this, but there is a class named CCTransitionScene and it's subclasses (e g CCFadeTransition) might do what you want.
精彩评论