theNeedle Posted April 7, 2018 Share Posted April 7, 2018 this.imageGroup = this.add.group(); for( var i = 0 ; i < 10 ; i++) { var image = this.add.image(100*i, 100*i, "box"); // Add Image this.imageGroup.add(image); // added image to group } this.imageGroup.clear(true); // Remove all Children. I'm using clear() method to remove all children of imageGroup. Can I add children to this group after performing clear. OR this group is deleted and I need to create another group. And what is the difference between clear(), remove() and delete() methods of GameObjects.Group class? Link to comment Share on other sites More sharing options...
samme Posted April 7, 2018 Share Posted April 7, 2018 remove: remove one member from the group (and the scene, if specified) clear: remove all members from the group (and the scene, if specified) destroy: clear, then disconnect the group from the scene You can use add after clear. digitsensitive, MeiaGaspea, NoxBrutalis and 1 other 4 Link to comment Share on other sites More sharing options...
samme Posted July 13, 2018 Share Posted July 13, 2018 Phaser.GameObjects.Group Link to comment Share on other sites More sharing options...
Recommended Posts