We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9821a7 commit 95c970eCopy full SHA for 95c970e
cocos2d/sprite_nodes/CCAnimationCache.js
@@ -181,8 +181,9 @@ cc.AnimationCache = cc.Class.extend(/** @lends cc.AnimationCache# */{
181
for (var key in animations) {
182
var animationDict = animations[key];
183
184
+ var isLoop = animationDict["loop"];
185
var loopsTemp = parseInt(animationDict["loops"]);
- var loops = (isNaN(loopsTemp)) ? 1 : loopsTemp;
186
+ var loops = isLoop ? cc.REPEAT_FOREVER : ((isNaN(loopsTemp)) ? 1 : loopsTemp);
187
var restoreOriginalFrame = (animationDict["restoreOriginalFrame"] && animationDict["restoreOriginalFrame"] == true) ? true : false;
188
var frameArray = animationDict["frames"];
189
0 commit comments