我有5个精灵帧,我把它们做成一个动画,每帧之间有0.05秒的延迟。然后我使用CCAnimate把它变成一个动作,然后在一个精灵上运行它。
CCAnimation *animation = [CCAnimation animationWithFrames:animationArray delay:0.05];
CCAnimate *animate = [CCAnimate actionWithDuration:10.0 animation:animation restoreOriginalFrame:YES];
[sprite runAction:animate];问题是帧的延迟是2秒,而不是0.05秒。是否有可能在10秒的持续时间内使用0.05秒的帧循环动画?
发布于 2011-11-23 22:52:07
我会提出以下建议:
CCAnimate actionWithDuration的第一个参数与您的延迟的乘积相匹配;CCRepeat在循环中重复您的基本动画:runAction:repeat; * repeat = CCRepeat动作带有动作:动画次数:5;精灵CCRepeat
https://stackoverflow.com/questions/8243783
复制相似问题