Jump to content

group from part of another group


fire7side
 Share

Recommended Posts

That's what I'm doing now, I was just wondering if it was slower gamewise to do it that way.  I think I'll also create two groups at the beginning and see if it's different.  The problem is when I do motion, I want to do all of them, but collision, not all of them.  I was wondering if I could make the same sprite a member of two different groups, but didn't know how to do it exactly.  You know, like make a group and then fill it with members of  another group leaving some out.

Link to comment
Share on other sites

I don't think it'd be slower since that's what Phaser does when you call collide on a group anyway; eventually it becomes a for loop over the children.

 

Sprites can only be members of one group. It has to do with how groups make up nodes in the scene graph so, logically, one sprite can't be drawn twice. I know Rich is working on separating the two concepts but we don't have it just yet.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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