1.26、字体
1、CCLabelAtlas字体
示例代码:
CCLabelAtlas*LBsocre4=CCLabelAtlas::create(CCString::createWithFormat("%d",c)->getCString(),"labelatlasimg.png",24,32,'0');
LBsocre4->setAnchorPoint(ccp(0,0.5));
LBsocre4->setPosition(ccp(200,200));
LBsocre4->setScale(0.7f);
LBsocre4->setString(CCString::createWithFormat("%d",c)->getCString());
this->addChild(LBsocre4,5);
2、CCLabelTTF字体
示例代码:
CCLabelTTF*scoreLab=CCLabelTTF::create("0","Arial",35);
scoreLab->setPosition(ccp(a,b));
scoreLab->setAnchorPoint(ccp(0,1));
scoreLab->setColor(ccc3(255,0));
scoreLab->setString(CCString::createWithFormat("%d",c)->getCString());
this->addChild(scoreLab,2);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。