Closed KamiFightingSpirit closed 4 years ago
As you closed this, I assume that you figured out that pretty much anything can be edited on the emitter, but it won't affect existing particles. For that you would have to modify each particle by reference.
Thanks Andrew, yes, I figured out how to edit the emitter object. However, with what you said, how do you select existing particles? Trying to locate the array...
Your mistake is looking for an array! Due to all of the pushing, shifting, and slicing that would occur, particle references are stored as doubly linked lists. The list of live particles can be accessed from the protected property _activeParticlesFirst
.
If you don't mind me asking, why are there some variables that are setup in different ways? For instance, on a particle, scale. It is setup both by itself as well as within transform.scale
DisplayObject.scale
is a convenience getter for DisplayObject.transform.scale
. Any scale related properties on Particle
itself are for calculating scale at any given time, rather than the current state.
I am trying to edit my emitter based off of different events (mouseover, mouseout etc)
Is there a guide to how to do this? I am finding that some things can only be edited once (minimumScaleMultiplied for example) and others just don't work (editing minR on the "ring" type emitter).
My approach currently was to just do direct edits to the emitter object:
Any help?