XeomDime Posted January 8, 2015 Share Posted January 8, 2015 Hi, why when i hit an enemy the entire enemies' group are destroyed? I want the individual enemy will be destroyed and not the entire group.//create function this.enemies = []; for (var i = 0; i < 1; i++){ this.enemies.push(enemy.create(game.world.randomX +1000,400, 'nemici')); } for (var i = 0; i < 2; i++){ this.enemies.push(enemy.create(game.world.randomX -1000, -200, 'nemici')); } }, update: function(){ for (var ii = 0; ii < this.enemies.length; ii++){ game.physics.arcade.moveToObject(this.enemies[ii],this.nave,vel_nem, this); game.physics.arcade.overlap(this.enemies[ii], this.bullets , this.morte_enemy,null,this); } Link to comment Share on other sites More sharing options...
Taleforge Posted January 9, 2015 Share Posted January 9, 2015 I guess you have to show us a bit more of your source code - i cant see anything that destroyes a sprite or group. Link to comment Share on other sites More sharing options...
Recommended Posts