예제 #1
0
CCParticleSystem* ParticleLayer::createPhoenix()
{
	CCParticleSystem *emitter = new CCParticleSystemQuad();
	emitter->initWithFile("Particles/Phoenix.plist");
	addChild(emitter, 10);

	return emitter;
}
CCParticleSystem * CCParticleSystem::create(const char *plistFile)
{
    CCParticleSystem *pRet = new CCParticleSystem();
    if (pRet && pRet->initWithFile(plistFile))
    {
        pRet->autorelease();
        return pRet;
    }
    CC_SAFE_DELETE(pRet);
    return pRet;
}
예제 #3
0
CCParticleSystem* ParticleLayer::createExplodingRing()
{
	CCParticleSystem *emitter = new CCParticleSystemQuad();
	emitter->initWithFile("Particles/ExplodingRing.plist");
	emitter->setAutoRemoveOnFinish(true);
//	emitter->setEndRadius(100.0f);

	addChild(emitter, 10);

	return emitter;
}
예제 #4
0
CCParticleSystem* ParticleLayer::createGalaxy()
{
	CCParticleSystem *emitter = new CCParticleSystemQuad();
	emitter->initWithFile("Particles/Galaxy.plist");
	//CCParticleSystem *emitter = CCParticleGalaxy::create();
	//emitter->retain();
	//emitter->setTexture( CCTextureCache::sharedTextureCache()->addImage("Particles/fire.png") );
	addChild(emitter, 10);

	return emitter;
}