Jump to content

call owner in callback function?


fkkcloud
 Share

Recommended Posts

I just wrote out a nice answer about how you can use closure to pass parameters through functions and then decided to read the Phaser docs, should have started with the docs :)

http://phaser.io/docs/2.4.4/Phaser.Physics.Arcade.html#overlap

`spriteA` and `spriteB` should be passed to the callback so something like

this.game.physics.arcade.overlap( SpriteA, SpriteB, function( a, b ) {
  console.log( a, b )
})

should work out just fine.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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