コード例 #1
0
 static LWFParticle *create(const char *path)
 {
     LWFParticle *particle = new LWFParticle();
     if (particle && particle->initWithFile(path)) {
         return particle;
     }
     delete particle;
     return NULL;
 }
コード例 #2
0
	static LWFParticle *create(const char *path)
	{
		LWFParticle *particle = new LWFParticle();
		if (particle && particle->initWithFile(path)) {
			particle->autorelease();
			return particle;
		}
		CC_SAFE_DELETE(particle);
		return NULL;
	}