【发布时间】:2011-06-01 21:18:46
【问题描述】:
CCLabelTTF *label = [CCLabelTTF labelWithString:@"Score : #" fontName:@"Arial" fontSize:14];
// ask director the the window size
CGSize size = [[CCDirector sharedDirector] winSize];
// position the label on the center of the screen
label.position = ccp( size.width + 0, size.height + 0 );
// add the label as a child to this Layer
[self addChild: label];
label.position = ccp( size.width + 0, size.height + 0 );
我如何在左下角获得该标签。我不太了解坐标系。据我了解,Y 是底部。 X在最左边。那么当我使用该代码时,标签的位置是右上角的。我的应用是纵向的。
最好将标签作为一个精灵,或者就这样保持它。 (它持有分数)
【问题讨论】:
标签: iphone ios4 cocos2d-iphone