Skip to content

Commit f923485

Browse files
author
pandamicro
committed
Fix reverted particle system dictionary parser
1 parent fe7f99c commit f923485

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cocos2d/particle/CCParticleSystem.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,8 +1405,14 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
14051405
locModeA.tangentialAccelVar = (pszTmp) ? parseFloat(pszTmp) : 0;
14061406

14071407
// rotation is dir
1408-
var locRotationIsDir = locValueForKey("rotationIsDir", dictionary).toLowerCase();
1409-
locModeA.rotationIsDir = (locRotationIsDir != null && (locRotationIsDir === "true" || locRotationIsDir === "1"));
1408+
var locRotationIsDir = locValueForKey("rotationIsDir", dictionary);
1409+
if (locRotationIsDir !== null) {
1410+
locRotationIsDir = locRotationIsDir.toString().toLowerCase();
1411+
locModeA.rotationIsDir = (locRotationIsDir === "true" || locRotationIsDir === "1");
1412+
}
1413+
else {
1414+
locModeA.rotationIsDir = false;
1415+
}
14101416
} else if (this.emitterMode === cc.ParticleSystem.MODE_RADIUS) {
14111417
// or Mode B: radius movement
14121418
var locModeB = this.modeB;

0 commit comments

Comments
 (0)