【持續更新中】從cocos2d-x 1.x.x 到 cocos2d-x 2.x.x 須知

首先說2.x.x推薦使用create函數。如果被提示聲明已被否決,可以把其換成create()試試。大笑

1.x:

this->runAction(CCSequence::actions(
                                            CCMoveBy::actionWithDuration(),
                                            CCCallFunc::actionWithTarget()
                                            ,NULL));
2.x:     
this->runAction(CCSequence::create(
                                           CCMoveBy::create(),
                                           CCCallFunc::create()
                                           ,NULL));

1.x: ccTime 如:update(ccTime dt)

2.x: float 如:update(float dt)


1.x:CCMutableArray<zzzzz*> *xxxxx
2.x:CCArray* xxxxx


1.x:LAYER_NODE_FUNC(xxxxx) 和 SCENE_NODE_FUNC(xxxxx)
2.x:CREATE_FUNC(xxxxx)
並且->
1.x:CCScene::node()
2.x:CCScene::create()


1.x:CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate()
2.x:CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate()


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章