以下是代码:
-(void)timerLabel{
timerLabel = [SKLabelNode labelNodeWithFontNamed:@"Arial"];
timerLabel.text = @"Time: 0";
timerLabel.fontColor = [UIColor whiteColor];
timerLabel.fontSize = 24.0f;
timerLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeRight;
timerLabel.position = CGPointMake(310, 10);
[self addChild:timerLabel];
}