Is There Any Particle System Tutorial
Cocos2d-x v3-
MoseHasLikes 0Problem Description
Hi there. As the title, will there be any particle system tutorial?
I am now studying it but I cannot see any of the implementation. I wonder whether I did not install cocos2d-x correctly.
Thanks!
void showStarParticleEffect(int color,Point position,Node* node) { ParticleExplosion* effect = ParticleExplosion::create(); effect->setTexture(Director::getInstance()->getTextureCache()->addImage("star.png")); effect->setTotalParticles(15); effect->setStartColor(getColor4F(color)); effect->setStartColorVar(Color4F(0,0,0,1)); effect->setEndColor(getColor4F(color)); effect->setEndColorVar(Color4F(0,0,0,1)); effect->setStartSize(25.0f); effect->setGravity(Point(0,-300)); effect->setLife(1.0f); effect->setSpeed(200); effect->setSpeedVar(10); effect->setPosition(position); node->addChild(effect); }
-
Sonar Systems adminLikes 0
Login to reply