Skip to content

Commit 759e4c6

Browse files
committed
fix cocosbuilder create particle error
1 parent d18be50 commit 759e4c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cocos2d/particle/CCParticleSystem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ cc.ParticleSystem = cc.Node.extend(/** @lends cc.ParticleSystem# */{
364364
this._quadsArrayBuffer = null;
365365
}
366366

367-
if (typeof(plistFile) === "number") {
368-
var ton = plistFile;
367+
if (!plistFile || typeof(plistFile) === "number") {
368+
var ton = plistFile || 100;
369369
this.setDrawMode(cc.ParticleSystem.TEXTURE_MODE);
370370
this.initWithTotalParticles(ton);
371371
} else if (plistFile) {
@@ -2824,4 +2824,4 @@ cc.ParticleSystem.TYPE_RELATIVE = 1;
28242824
* @constant
28252825
* @type Number
28262826
*/
2827-
cc.ParticleSystem.TYPE_GROUPED = 2;
2827+
cc.ParticleSystem.TYPE_GROUPED = 2;

0 commit comments

Comments
 (0)