Jump to content

Remove from group


K1m
 Share

Recommended Posts

How to remove items (sprites) from group, if I know only their coordinates. I did this:

my_group.forEach(function(item) {    if (item.x == 10 && item.y == 10) {        my_group.remove(item);    }});

and have error Cannot read property 'x' of undefined

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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