kurhlaa

How to set particles emitter's depth

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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.