phaserRr Posted November 29, 2018 Share Posted November 29, 2018 I am adding overlap in create function for bullets group and enemy1 sprite. I try many different variations but it either does not worked or throwed an error. this.physics.add.overlap(enemy1, bullets, killEnemy, null, this); function killEnemy(enemy1, bullet){ enemy1.visible = false; enemy1.active = false; } Link to comment Share on other sites More sharing options...
phaserRr Posted November 29, 2018 Author Share Posted November 29, 2018 I finally found the problem. I changed; //bullets = this.add.group to //bullets = this.physics.add.group it works now. Link to comment Share on other sites More sharing options...
Recommended Posts