0

以下のコード (サンプル) では、一連のアクション中にスプライトの画像を変更したいと考えています。

spriteActions =  [CCRepeatForever actionWithAction:
                    [CCSequence actions:
                     [CCShow action],
                     [CCDelayTime actionWithDuration:1.5],
                     [CCHide action],
                     [CCDelayTime actionWithDuration:5.0],
                     [CCShow action],
                     [CCDelayTime actionWithDuration:3.0],
                     // I would like to change the sprite image here before completing the remaining actions. 
//I want this line here: sprite = [CCSprite SpriteWithFile:@"newSpriteImage.png"];
                     [CCMoveTo actionWithDuration:2.0 position:newSpritePos],
                     [CCHide action],
                     [CCDelayTime actionWithDuration:2.0],
                    nil]];

[sprite runAction:spriteActions];

助けてくれてありがとう。

4

1 に答える 1