Jump to content

How to set particles emitter's depth


kurhlaa
 Share

Recommended Posts

Hello!

I've created a tilemap layer this way:

layer = map.createStaticLayer('ground', tiles, 0, 0).setDepth(1);

After that added a particles emitter this way:

particl = scene.add.particles('imagename').createEmitter({
    lifespan: 300,
    alpha: {
        start: 1,
        end:   0
    },
    on: false
});

 

Although the emitter is created after the layer - in the application particles are behind the layer's tiles, so partly not visible. How do I set the depth of the emitter to make it always visible? Any other way to bring it in front of the layer is also good.

 

Thanks!

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

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