Jump to content

how to call a function after sprite moves?


dthrasher90
 Share

Recommended Posts

So i have sprite moving from coordinates  (here, here) to location (there, there).  Everytime I try to console log game height, i can only get it to show the original location (here, here).  How can I tell phaser to log coordinates after the movement is finished?

Link to comment
Share on other sites

I'm curious how you are attempting to log the coordinates. You mentioned trying to log the game height, but this will not give you the coordinates of a sprite in the game. If you want the coordinates of a sprite named mySprite, then you could use mySprite.x and mySprite.y.

An example of the code you are using to log the coordinates might help in determining a solution.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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