我是Cocos2d的新手,并使用0.99.5和CCFadeTransition但显示错误为“CCFadeTransition”未声明(首次在此功能中使用)
我的代码。
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 transitionWithDuration:3 scene:scene];
//CCTurnOffTilesTransition* transitionScene = [CCTurnOffTilesTransition transitionWithDuration:3 scene:scene];
[[CCDirector sharedDirector] replaceScene:transitionScene];
只有我的cocos2d识别CCDirector但不识别CCFadeTransition,CCFadeTRTransition,CCRotoZoomTransition,CCShrinkGrowTransition,CCShrinkGrowTransition,CCTurnOffTilesTransition?为什么会如此。
答案 0 :(得分:2)
某些名称已在0.99.5版本中更改
您想要使用CCTransitionFade
http://www.cocos2d-iphone.org/api-ref/0.99.5/interface_c_c_transition_fade.html