Skip to content

Commit b3d7c70

Browse files
committed
Merge pull request #2782 from joshuastray/p
make particle can be created from a object
2 parents 536b903 + 72a8a85 commit b3d7c70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: cocos2d/particle/CCParticleSystem.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,10 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
341341
var ton = plistFile || 100;
342342
this.setDrawMode(cc.ParticleSystem.TEXTURE_MODE);
343343
this.initWithTotalParticles(ton);
344-
} else if (plistFile) {
344+
} else if (cc.isString(plistFile)) {
345345
this.initWithFile(plistFile);
346+
} else if (cc.isObject(plistFile)) {
347+
this.initWithDictionary(plistFile, "");
346348
}
347349
},
348350

0 commit comments

Comments
 (0)