Jump to content

How to move sprites ?


costa
 Share

Recommended Posts

Hello!

I am newbie in Phaser and I have a specific question:

 

For example, I have an interface and I need to create it via Phaser in canvas

holdRight = game.add.button(w/1.84, h/1.3092, 'holdRight', this.holdRight, this, 2, 1, 0);

At first I don't know where to place it in browser window of this interface and I need to change it again and again

I waste a lot of time changing x and y coordinates

 

How to set coordinates of sprites in easier way?

 

Thank you in advance and sorry for stupid question =)

Link to comment
Share on other sites

I don't really understand the question (or the problem). To position a Sprite you simply change its x and y properties. However the coordinates are the position of the Sprite within the game canvas, NOT within the browser window itself.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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