cocos2d-x新版本沒有LAYER_CREATE_FUNC

來源:互聯網
上載者:User

LAYER_CREATE_FUNC and SCENE_CREATE_FUNC can be replace by one macro CREATE_FUNC

http://www.cocos2d-x.org/issues/1442

老函數找不到了,要換成CREATE_FUNC

 

此外setDisplayFPS換成 setDisplayStats

itemFromNormalImage 換成 create

view 換成 getLocationInView

getIsVisible 換成 isVisible

 

太多了寫不完……

 

又發現cocos2d-x 2.0.4不能編譯IOS4.3版本,只能編譯IOS4.1版本,否則程式一閃而過。MAC OS X 10.6.6

 

另外打包的時候,注意選4.1的RELEASE版本,用ARM7不要用ARM6

 

 

cocos2d-1.0.1-x-0.13.0-beta 升級到 cocos2d-2.1rc0-x-2.1.3

 

CCSprite::spriteWithFile 換成 CCSprite::create

CCLabelAtlas::labelWithString 換成 CCLabelAtlas::create

setIsVisible 換成 setVisible

 

CCTextAlignmentLeft kCCTextAlignmentLeft

CCMenuItemSprite::itemFromNormalSprite 換成 CCMenuItemSprite::create

 

setIsTouchEnabled setTouchEnabled

 

 locationInView  getLocationInView

previousLocationInView getPreviousLocationInView

 

    //CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, true);
    CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, 0, true);//  2013-5-17 下午11:04:54

 

 

CCMenu::menuWithItem 
 

CCRect::CCRectIntersectsRect(a,b)  a.intersectsRect(b)

 

 

CCRect::CCRectGetMaxY(a)        a.getMaxY()

 

 

CCTextFieldTTF::textFieldWithPlaceHolder    CCTextFieldTTF::create

 

CCRect::CCRectContainsPoint(a)  a.containsPoint

 

boundingBoxInPixels      boundingBox

 

initFromNormalSprite  initWithNormalSprite

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.