cocos2d-x 3.0新特性

cocos2d-x 3.0新特性,第1张

概述1,原来的CC前缀基本都被移除,如CCScene变成Scene,CCLayerColor变成LayerColor, 2,CCMutableArray变成了Array(CCMutableArray已移除)等 3,有些cc前缀改为了on,如ccTouchesEnded改为了onTouchesEnded。 4.原来的shared*单例方法多改为get*,如CCDirector::sharedDirect 1,原来的CC前缀基本都被移除,如CCScene变成Scene,cclayercolor变成Layercolor, 2,CCMutableArray变成了Array(CCMutableArray已移除)等 3,有些cc前缀改为了on,如cctouchesEnded改为了ontouchesEnded。 4.原来的shared*单例方法多改为get*,如CCDirector::sharedDirector()改为Director::getInstance() 5.原来的spriteWith*,initWith*等静态方法,多修改为create。如CCMoveto::actionWithDuration改为Moveto::create,CCArray::array()改为Array::create()等。 6,原来的sets*方法改为set*,如如setIsVisible变成setVisible,setIstouchEnabled变成等settouchEnabled。 7,原来的cctouchesEnded(cocos2d::CCSet* touches,cocos2d::CCEvent* event)变ontouchesEnded(const std::vector<cocos2d::touch *> &touches,cocos2d::Event *event) 总结

以上是内存溢出为你收集整理的cocos2d-x 3.0新特性全部内容,希望文章能够帮你解决cocos2d-x 3.0新特性所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1005234.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存