ParticleBatchNode* ParticleBatchNode::create(const std::string& imageFile, int capacity/* = kParticleDefaultCapacity*/) { ParticleBatchNode * p = new (std::nothrow) ParticleBatchNode(); if( p && p->initWithFile(imageFile, capacity)) { p->autorelease(); return p; } CC_SAFE_DELETE(p); return nullptr; }
ParticleBatchNode* ParticleBatchNode::create(const char* imageFile, unsigned int capacity/* = kParticleDefaultCapacity*/) { ParticleBatchNode * p = new ParticleBatchNode(); if( p && p->initWithFile(imageFile, capacity)) { p->autorelease(); return p; } CC_SAFE_DELETE(p); return NULL; }
ParticleBatchNode* ParticleBatchNode::createWithTexture(Texture2D *tex, int capacity/* = kParticleDefaultCapacity*/) { ParticleBatchNode * p = new (std::nothrow) ParticleBatchNode(); if( p && p->initWithTexture(tex, capacity)) { p->autorelease(); return p; } CC_SAFE_DELETE(p); return nullptr; }
ParticleBatchNode* ParticleBatchNode::createWithTexture(Texture2D *tex, unsigned int capacity/* = kParticleDefaultCapacity*/) { ParticleBatchNode * p = new ParticleBatchNode(); if( p && p->initWithTexture(tex, capacity)) { p->autorelease(); return p; } CC_SAFE_DELETE(p); return NULL; }