将各种文本使用BMFont

来源:互联网 发布:java中什么时候用接口 编辑:程序博客网 时间:2024/05/16 01:29
var label = new cc.LabelTTF('今天天气真热',"Microsoft YaHei",30)
//label.enableStroke(cc.color(0,0,0,255),2)
label.setPosition(cc.winSize.width>>1,cc.winSize.height>>1)
label.setColor(cc.color(255,0,0,255))
this.addChild(label)

使用TTF文字或位图文字
var label_1 = new cc.LabelBMFont("MUSIC1",res.mikado_fnt);
label_1.setPosition(cc.winSize.width>>1,cc.winSize.height>>1)
label_1.setColor(cc.color(0,255,0,100))
this.addChild(label_1)
0 0