Jump to content

Overlap is not working. I am trying to kill enemy1 with bullets.


phaserRr
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...