Jump to content

How to add the mask (graphic) to group?


loover
 Share

Recommended Posts

In this example, the mask added to the game is used. Not inside a group (e.g. group.add(mask)) that contains boxes.

This not works:

var group = ...;
var box =...;
var mask = ...;
box.mask = mask;
group.add(box);
group.add(mask);

 

Link to comment
Share on other sites

But what if needed to have mask in group? For easy positioning on the screen, for example? Or when there are many masks for many sprites inside a group?

What are the technical limitations? Nested groups? Because if we call "game.add.graphics()" game adds this graphics into group called "world". Or not?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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