Jump to content

Flow the particles.


Gibson001
 Share

Recommended Posts

Hi guys.

 

I want to flow (not explode at once) specified quantity of particles. The point is that I tried couple of functions and none of the worked:

 

1) When I'm using Emitter.start(false, 5000, 100, 10, false) then it seems to work fine but when I try to start the emitter again then the quantity provided in second invocation is addind to the first one so i.e. if for the first time I emitted 10 particles and for the second time I want to emit 20 then I got 10+20=30 particles emitted.

 

2) So I tried to change the last parameter (forceQuantity) to true and it helped, at least when it comes to the amount of particles, because they've got emitted all at once although the first parameter (explode) was set to false.

 

3) Fortunately I found in documentation function flow (hurray!). But... it failed. I found in the source code that it does nothing more than calling start function with explode=false and forceQuantity=true (so all particles are emitted all at once as I mentioned in point 2).

 

So... do you guys have any suggestion? I'm seriously considering creating an issue because that looks like a bug for me. My suspect is line 446 in Emitter.js:

this._quantity += quantity;

which is causing amount of particles to sum up (as I mentioned in first point). Or maybe I just don't know what I'm doing and I'm using emitter in wrong way? I'll be very grateful for any clues.

 

P.S. I'm using Phaser 2.2.2

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...