Sign in to follow this  
Kacper Pietrzak

Applying multiple masks to single sprite

Recommended Posts

Question is pretty straightforward, how can I apply multiple masks to one sprite.

Let's say I have a sprite and I want it to be displayed only in particular places. In my case I want zombies to be visible only in light, having only flashlight it's pretty easy to implement since there is only one source of light and I can do something like that:

this.zombies.setAll('mask', this.flashlightGraphics);

But what do I do when I want to apply multiple masks, is there a way to combine graphics objects ?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.