ParticleTest

This commit is contained in:
James Chen 2012-04-05 14:19:22 +08:00
parent 931c42a621
commit 2b272e2813
2 changed files with 11 additions and 1 deletions

View File

@ -68,6 +68,16 @@ bool HelloWorld::init()
// add the sprite as a child to this layer
this->addChild(pSprite, 0);
CCParticleSystem* pTmp = CCParticleSystemQuad::particleWithFile("LavaFlow.plist");
CCParticleBatchNode* pBatch = CCParticleBatchNode::batchNodeWithTexture(pTmp->getTexture());
addChild(pBatch);
pTmp->unscheduleUpdate();
CCParticleSystem* pSys = CCParticleSystemQuad::particleWithFile("LavaFlow.plist");
pBatch->addChild(pSys);
pSys->setPosition(ccp(size.width/2, size.height/2));
return true;
}

View File

@ -1 +1 @@
2d9494d763406ba9945e40f011820005d14b92eb
ce13f14088361cd82d63174ca2c3134f69b1e8bb