Jump to content

call owner in callback function?


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 :)


`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


  • Recently Browsing   0 members

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