下面在我的代碼的delayperunit屬性保持在屏幕上子畫面2.5秒它改變之前。我真正想要做的是顯示0.5秒的精靈,以便有2.0第二個破(不顯示動畫)下一個出現另0.5秒,等等之前。我怎樣才能做到這一點?設定子畫面顯示持續
// Create the intro image
CGSize screenSize = [CCDirector sharedDirector].winSize;
CCSprite *introImage = [CCSprite spriteWithFile:@"intro1.png"];
[introImage setPosition:ccp(screenSize.width/2, screenSize.height/2)];
[self addChild:introImage];
// Create the intro animation, and load it from intro1 to intro7.png
CCAnimation *introAnimation = [CCAnimation animation];
[introAnimation delayPerUnit:2.5f];
for (int frameNumber=0; frameNumber < 8; frameNumber++) {
CCLOG(@"Adding image intro%d.png to the introAnimation.",frameNumber);
[introAnimation addSpriteFrameWithFilename:
[NSString stringWithFormat:@"intro%d.png",frameNumber]];
}