0
我正在创建一个游戏,并在我的指令班中创建了一个标签,并附有说明我无法弄清楚为什么我的标签没有按照我的指示打印?
但是,由于某些原因,当我运行我的游戏时,说明不打印。 我很难找出原因。
非常感谢您给我提供的任何帮助!
#import "Instructions.h"
#import "MainMenu.h"
@implementation Instructions
+ (CCScene *) scene
{
CCScene * scene = [CCScene node]; // scene is an autorelease object
Instructions * layer = [Instructions node]; // later is an autorelease object
[scene addChild: layer]; // add layer as a child to scene
return scene; // return the scene
}
- (id) init
{
if ((self = [super init]))
{
[ self how ];
}
return self;
}
- (void) how
{
// Create the label
CCLabelTTF *label = [CCLabelTTF labelWithString:@"The object of this game is for kangaroo Leo to collect various berries by jumping and running through obstacles in order to unlock other kangaroos and the worlds in which they live." fontName:@"Consolas" fontSize:16];
// Position it on the screen
label.position = ccp(160,240);
// Add it to the scene so it can be displayed
[self addChild:label z:0];
}
@end
你有使用内置的字体,如“标记觉得”同样的问题?你是否还有机会使用相同颜色的文字和bg? – yannicuLar 2012-08-23 21:21:47