Simple Question about Emitter


(Jean) #1

So, I was checking about the pink demo and this and don’t understand a few things… On the constructor of the Emitter, frameWidth and frameHeight works like a SpriteMap?

When creating a new type of particle, what the array as parameter does? On the pink demo there is an array from 0 to 14, and on the other demo there is only 0. On the trail there is only 1.


(Jacob Albano) #2

The array acts as a list of frames to use for that particle. When the particle is spawned, it will play those frames like a spritemap over its lifespan.

In the case of single-element frame arrays, only the frame specified in the array will “play”, resulting in a static image with no animation.