Jump to content

how get sprite object from targetObject


Recommended Posts

Normally you'd use events for this - onInputOver detects pointer over events, if you want clicks/taps use onInputDown:

sprite.inputEnabled = true;sprite.events.onInputOver.add(function(currentSprite) {  currentSprite.body.thrust(0);}, this);
Link to comment
Share on other sites


  • Recently Browsing   0 members

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