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为所转博客中的图片,参数与该图片直接相关

posted on 2013-01-26 13:26  紫澜  阅读(1065)  评论(1编辑  收藏  举报