'CCFadeTransition' undeclared
I am new to Cocos2d and using 0.99.5 with CCFadeTransition but showing error as 'CCFadeTransition' undeclared (first use in this function)
My code.
CCFadeTransition* transitionScene = [CCFadeTransition transitionWithDuration:3 scene:scene withColor:ccRED];
//CCFadeTRTransition* transitionScene = [CCFadeTRTransition transitionWithDuration:3 scene:scene];
//CCRotoZoomTransition* transitionScene = [CCRotoZoomTransition transitionWithDuration:3 scene:scene];
//CCShrinkGrowTransition* transitionScene = [CCShrinkGrowTransition transitionW开发者_Go百科ithDuration:3 scene:scene];
//CCTurnOffTilesTransition* transitionScene = [CCTurnOffTilesTransition transitionWithDuration:3 scene:scene];
[[CCDirector sharedDirector] replaceScene:transitionScene];
Only my cocos2d recognize CCDirector but not CCFadeTransition, CCFadeTRTransition, CCRotoZoomTransition, CCShrinkGrowTransition, CCShrinkGrowTransition, CCTurnOffTilesTransition ?? Why is this so.
Some names have been changed in 0.99.5 version
You want to use CCTransitionFade instead
http://www.cocos2d-iphone.org/api-ref/0.99.5/interface_c_c_transition_fade.html
精彩评论