Hello guys,
I am developing a game on the new HTML5 engine and I have troubles with particle effects. When I make a build in a studio (Cocos Code IDE Build:V1.0.0.RC1) everything works fine, but when I make a build in a web browser (Google Chrome, Mozilla Firefox) particle system sometimes works, but sometimes doesn`t.
Here is the code how I use the particle system:
this.blowEffect = cc.ParticleSystem.create(res.ZombieBlow_plist); //once in ctor
//run particle effect
var self = this;
this.graphicsContainer.runAction(
cc.Sequence.create([
cc.CallFunc.create(function(){
self.blowEffect.resetSystem(); //because it is reused if the level is restarted
self.blowEffect.x = self.graphics.x;
self.blowEffect.y = self.graphics.y;
self.graphicsContainer.addChild(self.blowEffect);
}, this.graphicsContainer),
cc.DelayTime.create(this.blowEffect.getLife() + this.blowEffect.getLifeVar() + 0.1),
cc.CallFunc.create(function(){
self.graphicsContainer.removeChild(self.blowEffect);
self.blowEffect.retain();
}, this.graphicsContainer)
])
);
Is it a bug? Or maybe I am using particle system in a wrong way?