Skip to content

Commit 72a8a85

Browse files
author
joshuastray
committed
make particle can be created from a object
1 parent 2d00a32 commit 72a8a85

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)