• Runtimes
  • Control game particle emitter draw order from spine animation draw order

Using C++ runtime.

My spine character has placeholds from particle emitters etc that I add in the game. They change draworder during animation playback, so I need to also update my game's particle emitter's Z-order.

What's best practice to for my code to detect draworder changes to a few slots? I currently have 42 slots, will be more soon. Is there an event I can listen to or does my code need to compare draworder lists for all slots each animation frame?

Related Discussions
...

There is no event for it. You could simply loop over the slots and set the particle z-order when the relevant slot is encountered. This is fast and will work for many hundreds of slots without being able to notice the time it takes.

Another way might be to modify the renderer, so as each slot is rendered, the particles are also rendered at the appropriate time, then more slots are rendered.