Skip to content

Commit 31837c0

Browse files
authored
Merge pull request cocos2d#3394 from Dimon4eg/Fix-particle-system-load-from-plist
Fix particle system load from plist generated by x-studio365
2 parents 078600d + a700c21 commit 31837c0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cocos2d/particle/CCParticleSystem.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1391,8 +1391,13 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
13911391
locModeA.tangentialAccelVar = (pszTmp) ? parseFloat(pszTmp) : 0;
13921392

13931393
// rotation is dir
1394-
var locRotationIsDir = locValueForKey("rotationIsDir", dictionary).toLowerCase();
1395-
locModeA.rotationIsDir = (locRotationIsDir != null && (locRotationIsDir === "true" || locRotationIsDir === "1"));
1394+
var locRotationIsDir = locValueForKey("rotationIsDir", dictionary);
1395+
if (locRotationIsDir !== null) {
1396+
locRotationIsDir = locRotationIsDir.toString().toLowerCase();
1397+
locModeA.rotationIsDir = (locRotationIsDir === "true" || locRotationIsDir === "1");
1398+
}
1399+
else
1400+
locModeA.rotationIsDir = false;
13961401
} else if (this.emitterMode === cc.ParticleSystem.MODE_RADIUS) {
13971402
// or Mode B: radius movement
13981403
var locModeB = this.modeB;

0 commit comments

Comments
 (0)