Binary Moon Posted July 23, 2014 Share Posted July 23, 2014 Still making my little colour matcher and I want to add some particle effects. What I want to do is have the particles emit from the balls as they pop. Currently I have a tween on each ball so that it shrinks down when removed and I thought that I could just set the emitter position and emit some particles. My setup code (in create function) is below this.emitter = game.add.emitter(0, 0, 100); this.emitter.makeParticles('dot-particles', [0,1,2,3,4,5,6]); this.emitter.gravity = 0; this.dots.add(this.emitter);Then each time a bubble is popped I do: this.emitter.x = dot.x; this.emitter.y = dot.y; this.emitter.start(true, 2000, null, 10);However this only works for a single ball each time. It doesn't do anything for the others. My guess is that I can only start an emitter once per 'loop' but I don't see why. I can see that the emitter.start is being called on each loop because the associated tween for each ball is happening. Any help would be most appreciated! Link to comment Share on other sites More sharing options...
XekeDeath Posted July 23, 2014 Share Posted July 23, 2014 Do an emitter.update after the start, before you move it to the next position... bluedot 1 Link to comment Share on other sites More sharing options...
Binary Moon Posted July 23, 2014 Author Share Posted July 23, 2014 perfect - thanks! Link to comment Share on other sites More sharing options...
bluedot Posted July 25, 2014 Share Posted July 25, 2014 Thanks. I was after this exact answer. Link to comment Share on other sites More sharing options...
Recommended Posts