CCLabelAtlas

CCLabelAtlas

1.CCLabelAtlas的一点技巧
    转自:CCLabelAtlas的一点技巧
2.代码示例
 1 -(void) testCCLabelAtlas
 2 {
 3     // create the label
 4     CCLabelAtlas *label = [CCLabelAtlas labelWithString: @"2:13:126" charMapFile: @"img_char_map.png" itemWidth: 25 itemHeight: 27 startCharMap: '1'];
 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     
10 }
    其中img_char_map.png为所转博客中的图片,参数与该图片直接相关
原文地址:https://www.cnblogs.com/ketmales/p/2877738.html