开发者

Cocos2d for iPhone: i have a delay with with animation (fps collapses)

I've this problem: in my game, when I tap a sprite, an animation in called.开发者_运维问答 This animation is stored inside a singleton class (called Animation) that is inizialized in the didFinischLaunching method. When I need for an action i use this code:

[self runAction:[[Animation sharedAnimation] animationName]];

On the device when I tap the sprite for the first time, occurs the following issues (one and only at the first tap):

  1. There is a delay from the moment when I tap the sprite and the moment that the animation really starts;
  2. In this interval (delay) the frame count collapses to 10fps (in some case even to 6fps)

This issues there aren't when I tap the same sprite for a second, third, etc times.

Ideas ??

Thanks very much!


Do you alloc the spriteframes in your animation init method? If so, that's why.

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜