error: 'CCZoomFlipXTransition' undeclared
看著tutorial用Cocos2D寫一些簡單的代碼,其中用到CCZoomFlipXTransition,但在build時卻出現下面這個錯誤:
'CCZoomFlipXTransition' undeclared (first use in this function)
原因是新版本的Cocos2D的轉場名字改變了,將
[[CCDirector sharedDirector]replaceScene:[CCZoomFlipXTransition transitionWithDuration:1 scene:[Ball node]]];
改成
[[CCDirector sharedDirector]replaceScene:[CCTransitionFlipX transitionWithDuration:1 scene:[Ball node]]];
即可!
'CCZoomFlipXTransition' undeclared (first use in this function)
原因是新版本的Cocos2D的轉場名字改變了,將
[[CCDirector sharedDirector]replaceScene:[CCZoomFlipXTransition transitionWithDuration:1 scene:[Ball node]]];
改成
[[CCDirector sharedDirector]replaceScene:[CCTransitionFlipX transitionWithDuration:1 scene:[Ball node]]];
即可!