Class cc.ParticleBatchNode#ctor
- Defined in: CCParticleBatchNode.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
cc.ParticleBatchNode#ctor(fileImage, capacity)
initializes the particle system with the name of a file on disk (for a list of supported formats look at the cc.Texture2D class), a capacity of particles
|
Class Detail
cc.ParticleBatchNode#ctor(fileImage, capacity)
initializes the particle system with the name of a file on disk (for a list of supported formats look at the cc.Texture2D class), a capacity of particles
1.
//Create a cc.ParticleBatchNode with image path and capacity
var particleBatchNode = new cc.ParticleBatchNode("res/grossini_dance.png",30);
2.
//Create a cc.ParticleBatchNode with a texture and capacity
var texture = cc.TextureCache.getInstance().addImage("res/grossini_dance.png");
var particleBatchNode = new cc.ParticleBatchNode(texture, 30);
- Parameters:
- {String|cc.Texture2D} fileImage
- {Number} capacity