Jump to content

Groups flattening?


loops
 Share

Recommended Posts

I have a sprite that I would like to follow another sprite, so I have added it as a child. The parent sprite is then added to a group. When I forEach over the group, the child sprite shows up as an element. Looking through the code, it looks like the addChild call results in the list flattening by adding the child as the next element to the parent instead of creating a tree. Is this intended?

 

The idea is to have a health bar following a character. When I process the characters, I don't want to also be processing the health bars. Is there another mechanism by which this is accomplished?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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