CCLabelBMFont

CCLabelBMFont

1.代码example
1 -(void) testCCLabelBMFont
2 {
3     // create the label
4     CCLabelBMFont *label = [CCLabelBMFont labelWithString: @"abc" fntFile: @"futura-48.fnt"];
5     // set position of the label
6     [label setPosition: ccp(240.0f, 160.0f)];
7     // add the label to the layer
8     [self addChild: label];
9 }
2.注意
    需要.fnt和.png文件,在代码中只需要@"*.fnt",cocos2d引擎会自动去找对应.png文件
原文地址:https://www.cnblogs.com/ketmales/p/2877710.html