これについてどうすればいいですか?私のコードの一部をお見せできます。しかし、基本的には、文字列などを保存する必要があると推測しています。どんなヒントでも大歓迎です。これは別のシーンで出してほしい。
.h ファイル
int _score;
int _oldScore;
CCLabelTTF *_scoreLabel;
@property (nonatomic, assign) CCLabelTTF *scoreLabel;
.m ファイル
_score = 0;
_oldScore = -1;
self.scoreLabel = [CCLabelTTF labelWithString:@"" dimensions:CGSizeMake(100, 50) alignment:UITextAlignmentRight fontName:@"Marker Felt" fontSize:32];
_scoreLabel.position = ccp(winSize.width - _scoreLabel.contentSize.width, _scoreLabel.contentSize.height);
_scoreLabel.color = ccc3(255,0,0);
[self addChild:_scoreLabel z:1];
if (_score != _oldScore) {
_oldScore = _score;
[_scoreLabel setString:[NSString stringWithFormat:@"score%d", _score]];
}