costa Posted April 26, 2015 Share Posted April 26, 2015 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 canvasholdRight = 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 againI 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 More sharing options...
rich Posted April 26, 2015 Share Posted April 26, 2015 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 More sharing options...
drhayes Posted April 27, 2015 Share Posted April 27, 2015 Do you mean that you want to "pin" the object to one corner of your game's canvas and not move it? Like a health bar or a score? If so, check out the fixedToCamera property. Or keep an eye out for the upcoming FlexGrid stuff (which isn't done yet right now). Link to comment Share on other sites More sharing options...
Recommended Posts