Jump to content

Make a group of enemys follow my player...


rhennig
 Share

Recommended Posts

Hello guys, im still learning Phaser and i'm stucked now with this... how can i make a group of enemys follow my player? I've tryied with one enemy and this works perfectly:

this.physics.arcade.moveToObject(this.enemy,this.player);

but when i try with a group with:

this.enemies.forEach(this.physics.arcade.moveToObject(this.enemy,this.player));

It doesn't works... :(

 

Any tip? Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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