dthrasher90 Posted March 3, 2017 Report Share Posted March 3, 2017 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? Quote Link to comment Share on other sites More sharing options...
Rydez Posted March 4, 2017 Report Share Posted March 4, 2017 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. Quote Link to comment Share on other sites More sharing options...
dthrasher90 Posted March 4, 2017 Author Report Share Posted March 4, 2017 I used onComplete. I had a sprite set to a variable, it's a football game, so after the tween movement, i used onComplete method to log the coordinates. I'll have to get my laptop out to get you the code Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.