proton-drizzle Posted May 1, 2014 Share Posted May 1, 2014 I'm looking into how to pause a particle emitter without pausing the whole game.I can stop the emitter emitting, and changing alpha overriding the emitter's update but that doesn't control their movement, nor does the particle's update. Can anyone shed any light on what controls/updates the particles movement/position? thanks Link to comment Share on other sites More sharing options...
rich Posted May 1, 2014 Share Posted May 1, 2014 There is no way to do this 'natively', i.e. no single function for it. But an Emitter is basically just a Group and each Particle a child of that Group. You could craft a custom Particle class that has some logic in it that stops it's Body.preUpdate method being called, or you could use Group.setAll to do something like body.moves = false on all children. Link to comment Share on other sites More sharing options...
proton-drizzle Posted May 1, 2014 Author Share Posted May 1, 2014 Thanks Rich, I eventually overwrote enough functionality to stop them moving, animating and dying. A combination of all of what you talked about.I would be happy to put a piece of production ready code together if you think there might be demand for it? Link to comment Share on other sites More sharing options...
rich Posted May 1, 2014 Share Posted May 1, 2014 if you share it here I'm sure others will find it useful, but it's not something I'd be looking to merge into core right now. Link to comment Share on other sites More sharing options...
proton-drizzle Posted May 9, 2014 Author Share Posted May 9, 2014 The overrides of the emitter and particle I've used are here. It could be improved, for some, with getter/setter but personally I try not to use them. https://gist.github.com/anonymous/39aa102bd2ccf3b29670 Call emitter.setPaused(true) to pause the emitter. Link to comment Share on other sites More sharing options...
Recommended Posts