Hi, i am working in a game and cant remove child from a group… I have tried a lot of things and read a lot but cant find a solution. This is my actual collider code.
this.physics.add.collider(
this.player,
this.enemie1,
function (callback){
this.enemie1.remove(this.enemie1.get(),true)
this.player.destroy();
let explosion = this.add.sprite(200, player.y, 'boom');
explosion.play('explode');
explosion.on('animationcomplete', function(listener){
this.gameOver = true;
}.bind(this))
}.bind(this));
I have tried this way too but this deletes more than one enemie
this.enemie1.children.iterate(function (child) {
this.enemie1.remove(child,true);
}.bind(this));