cocos2d-x game slows down while showing effect of CCParticleExplosion

188 Views Asked by At

I am using this->schedule( schedule_selector(HelloWorld::Game), 0.01);

and in my game play function game slows down due to following code

CCTexture2D* texture = CCTextureCache::sharedTextureCache()->textureForKey("CloseSelected.png");
                CCParticleExplosion* firework = CCParticleExplosion::create();
                firework->setTexture(texture);
                firework->setPosition(ccp(((CCSprite *) shipLaser)->getPositionX(),((CCSprite *) shipLaser)->getPositionY()));
addChild(firework);

whenever the explosion effect take place the game remains slow.

  1. another thing how I can reduce the radius of explosion ? Thanks
0

There are 0 best solutions below