nExt Posted April 27, 2014 Share Posted April 27, 2014 Hello i try making fappy bird demo in tutorial ..i fisnished and i want fix interface game..but i have problem ..size game is : 400x 490i create button play var sprite = game.add.button(game.world.centerX, game.world.centerY +20, 'play', menu_state.start,this); but it display not in center (button play.png size 70x70) and when i try in in emulator : -> all of object display not true, so i want code to more device.. please help me .. i don't have more experience .. and finally question : have phaser is good framwork for desktop, not for mobile .. i don't see more game android or ios write by phaser..(and i see some topic , have bug it not run or have bug for android..) Link to comment Share on other sites More sharing options...
BigRob154 Posted April 27, 2014 Share Posted April 27, 2014 Try this. I had the same issues, this worked for me.var sprite = game.add.button(game.width/2, game.height/2 +20, 'play', menu_state.start,this);sprite.anchor.set(0.5, 0.5); Link to comment Share on other sites More sharing options...
nExt Posted April 27, 2014 Author Share Posted April 27, 2014 Try this. I had the same issues, this worked for me.var sprite = game.add.button(game.width/2, game.height/2 +20, 'play', menu_state.start,this);sprite.anchor.set(0.5, 0.5);i tried this.. but it not change ! Link to comment Share on other sites More sharing options...
Heppell08 Posted April 27, 2014 Share Posted April 27, 2014 var sprite = game.add.button(game.world.width/2, game.world.height/2 +20, 'play', menu_state.start,this)Use the world to center it better. Link to comment Share on other sites More sharing options...
Recommended Posts