jorbascrumps Posted October 29, 2017 Share Posted October 29, 2017 I created an issue without reading the contribution guide (oops), so I'll pose my question here: I'm not sure if this is a bug but it definitely seems counter-intuitive to me.. It is possible to use the following snippet to add a `Sprite` to a `Group` and have it shown on-screen: const group = this.add.group(); group.create(0, 0, 'player'); However, using the following snippet to add a custom `Sprite` does not show the results on-screen: const playerSprite = new PlayerSprite(/* .. */); // extends Phaser.GameObjects.Sprite const group = this.add.group(); group.add(playerSprite); From what I can tell this is because `Group.add()` and `Group.addMultiple()` don't include this line: this.scene.sys.displayList.add(child); If this behaviour is intentional, please let me know if I should be using another method. Otherwise, I'd be happy to submit a PR to fix. I'm using v3.0.0-beta.7 PS - If the powers that be can delete my Github issue, that'd be much appreciated! Link to comment Share on other sites More sharing options...
Recommended Posts