【发布时间】:2016-01-22 21:45:26
【问题描述】:
当分数更新时,一个新的分数值标签会覆盖显示屏上的旧分数,因为这个分数是不可读的,如何更新新分数?这是我得到的:
SKLabelNode *ScoreLabel;
NSInteger score = 0;
-----------------------------
-(void)Scoring{
score = score +1;
ScoreLabel = [SKLabelNode labelNodeWithFontNamed:@"Arial"];
ScoreLabel.position = CGPointMake(CGRectGetMidX(self.frame), 960);
ScoreLabel.text = [NSString stringWithFormat:@"%ld",(long)score];
[self addChild:ScoreLabel];
}
【问题讨论】:
标签: ios objective-c sprite-kit nsstring