Cocos2d iphone 如何在cocos2d中设置标签值的动画?

Cocos2d iphone 如何在cocos2d中设置标签值的动画?,cocos2d-iphone,label,Cocos2d Iphone,Label,我正在用iphone制作老虎机游戏。我使用cocos2d作为它的语言。我非常不安的方法,将在游戏中的得分动画编码。动画与fps类似。你能帮我做吗。在cocos2d中设置乐谱动画。你能分享一下我现在需要的示例代码吗。提前谢谢。以下是我的评分方法。它不是真正的动画,但如果你想它像fps,这将做它。当你的分数改变时,就调用这个方法 在init方法中: // create and initialize the _scoreLabel _scoreLabel = [CCLabel lab

我正在用iphone制作老虎机游戏。我使用cocos2d作为它的语言。我非常不安的方法,将在游戏中的得分动画编码。动画与fps类似。你能帮我做吗。在cocos2d中设置乐谱动画。你能分享一下我现在需要的示例代码吗。提前谢谢。

以下是我的评分方法。它不是真正的动画,但如果你想它像fps,这将做它。当你的分数改变时,就调用这个方法

在init方法中:

    // create and initialize the _scoreLabel
    _scoreLabel = [CCLabel  labelWithString:@" "
                            dimensions:CGSizeMake(labelSizes.width,labelSizes.height)
                            alignment:UITextAlignmentLeft
                            fontName:@"Helvetica"
                            fontSize:20.0];
    _scoreLabel.color = ccc3(255,255,255);
    _scoreLabel.position = ccp((labelSizes.width / 2), (winSize.height - (labelSizes.height / 2)));
    [self addChild:_scoreLabel z:1];
这是分数更新方法:

-(void)updateScore {
    [_scoreLabel setString:[NSString stringWithFormat:@"Score: %d / %d", _score, _scoreToWin]];
}
然后,要在分数更改时更新分数,请按如下方式调用:

    // Then later to set the Score
    [self updateScore];

我是这样做的:

 _odd = _odd + _stage*value;
 [self schedule:@selector(pointAdder) interval:1.0/(3.0*_odd)];


对不起,你想干什么?设置标签动画要做什么?喜欢打字的效果吗?这一个只更新分数就知道了!!!他需要把乐谱制作成动画!
- (void)pointAdder {
    if (_odd==0) {
        [self unschedule:@selector(pointAdder)];
        return;
    }
    else {
        int tmp = [_lblScore.string intValue];
        [_lblScore setString:[NSString stringWithFormat:@"%i",tmp+1]];
        _odd--;
    }
}