0
我要玩的PNG文件的序列動畫。 我試圖在cocos2d iphone播放的PNG文件序列在cocos2d iphone
(void) onEnter {
[super onEnter];
roadSprite=[[Sprite spriteWithFile:@"R00.png"] retain];
[roadSprite setPosition:ccp(240,160)];
[self addChild:roadSprite z:5];
Animation* animation = [Animation animationWithName:@"animation" delay:0];
for(int i=0;i<25;i++)
{
[animation addFrameWithFilename: [NSString stringWithFormat:@"R%02d.png", i]];
}
id action1 = [Animate actionWithAnimation: animation];
[roadSprite runAction:action1];
}
動畫犯規得到發揮,而不是R00.png得到最後顯示執行以下代碼。 誰能幫助我發現其中的錯誤。
感謝名單很多納什。 它的工作原理。 – Muniraj 2010-02-05 04:48:47