位置: 编程技术 - 正文

Cocos2dx CCLabelAtlas字体与CCLabelTTF字体的使用方法

编辑:rootadmin
&#;&#;

推荐整理分享Cocos2dx CCLabelAtlas字体与CCLabelTTF字体的使用方法,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

1.、字体

1、CCLabelAtlas字体

示例代码:

CCLabelAtlas*LBsocre4 = CCLabelAtlas::create(CCString::createWithFormat("%d", c)->getCString(), "labelatlasimg.png", , ,'0');

LBsocre4->setAnchorPoint(ccp(0,0.5));

LBsocre4->setPosition(ccp(,));

LBsocre4->setScale(0.7f);

LBsocre4->setString(CCString::createWithFormat("%d", c)->getCString());

Cocos2dx   CCLabelAtlas字体与CCLabelTTF字体的使用方法

this->addChild(LBsocre4,5);

2、CCLabelTTF字体

示例代码:

CCLabelTTF*scoreLab = CCLabelTTF::create("0", "Arial", );

scoreLab->setPosition(ccp(a,b));

scoreLab->setAnchorPoint(ccp(0, 1));

scoreLab->setColor(ccc3(,,0));

scoreLab->setString(CCString::createWithFormat("%d", c)->getCString());

this->addChild(scoreLab, 2);

&#;&#;

Bullet(Cocos2dx)之创建地形 Bullet提供了几个类btBvhTriangleMeshShape,btHeightfieldTerrainShape去创建一些网图形,首先了解btHeightfieldTerrainShape,通过高度图数据创建一个3D地形。Astaticmeshthat

Cocos2dx ParticleEditor粒子编辑器 下载地址:程序调用代码:(plist文件要和贴图在同一目录)//创建粒子对象CCParticleSystem*lizi=newCCParticleSystemQuad();//设置plist动画文件lizi-initWithFile(rain1.pli

cocos2dx3.2开发 RPG《Flighting》(三)从Excel表中加载需要的数据 一、前言在一个游戏里面,需要用到的数据一般都是由游戏策划提供的(这里的策划还是由我自己担任啦哈哈)。什么是需要用到的数据?例如我创建

本文链接地址:https://www.jiuchutong.com/biancheng/372651.html 转载请保留说明!

上一篇:cocos2dx之TableView和ScrollView的混合使用(cocos2d-js-min.js)

下一篇:Bullet(Cocos2dx)之创建地形

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络