How can I use UIViewAnimationTransitionCurlUp for scene transitions in Cocos2d?
For a storybook application being developed (with cocos2d-iphone), I am currently using the CCTransitionPageTurn class to handle the transitions between each page's scene. This is dandy and all but I would really like to use UIViewAnimationTransitionCurlUp transition from the iOS SDK library (much more crispy in my opinion). Here is an example开发者_StackOverflow of what I am currently doing:
PageThreeScene *pageThreeScene = [PageThreeScene node];
[[CCDirector sharedDirector] replaceScene:[CCTransitionPageTurn transitionWithDuration:1.0 scene:pageThreeScene ]];
Does anyone have any recommendations on how I might go implementing scene switches with iPhone SDKs own UIViewAnimationTransitionCurlUp for transitions between scenes? Would something like that be a big pain? Thanks ahead of time for any input.
Regards,
Chris
You can't apply UIViewAnimationTransitionCurlUp to a CCScene because it is not a UIView. And placing CCScene in a UIView wouldn't work because then the scene wouldn't be attached to CCDirector. Plus it wouldn't accept CCScene as a view anyway, because it is not a UIView.
You could (probably) apply the effect to the openGL view of your entire game, but that's not what you want, I know.
精彩评论