开发者

How to replace scenes with some action with the help of CCDirector?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜