Jump to content

game.physics.arcade.overlap error


Aperosuz
 Share

Recommended Posts

Hi everybody,

I want to call a function if one group and one sprite overlap (or collide, i have try with the two but no one work ..)

So i make this

game.physics.arcade.overlap(enemyBullet(group), boat(sprite), enemyHitsPlayer(function), null, this);

But when i play my game, the screen going black and say enemyHitsPlayer is not defined..

i have put this line on my update() function...

I work on the 2.4.3 phaser.io version.

 

Thanks for your help

I hope you have all the information to help me

 

Aperosuz

Link to comment
Share on other sites

Sorry i don't understand your first question, but i have remove the second part of my overlap to let only

game.physics.arcade.overlap(enemyBullet, boat, enemyHitsPlayer);

and i move the function enemyHitsPlayer just after my update function and it work.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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