Mike018 Posted November 15, 2016 Share Posted November 15, 2016 When I started modularizing all my sprites into classes (ES6), I would create a group per object and put all the body parts into that group. After dealing with the annoyance of when the group needs have input enabled or needed to be dragged, as well as it just not making logical sense of 1 object being a 'group', I'm thinking about changing all 1 object classes to extend Phaser.Sprite instead and adding them as children. I'm wondering what everyone else does? It seems that this way will be a lot more flexible since you don't have to deal with all the subtleties of interacting with a group Link to comment Share on other sites More sharing options...
jimanji Posted November 17, 2016 Share Posted November 17, 2016 ive been thinking of groups as layers in the game. like a background group, ground group, objects group, character group, etc. my sprites are individual things or things that have something that belongs to them. like a tree or a guy with a gun. in that case the guy would be a sprite with a child item for the gun. then i can add tile sprites to ground group and player and monsters to character group and position the character in front of the ground. Link to comment Share on other sites More sharing options...
Recommended Posts