Gods Posted March 18, 2015 Share Posted March 18, 2015 The phaser examples shows how to do buttons with multiple images. I was wondering what are some ways you can make a single button image look like they're pressed. is it possible to lower the button a few pixel on press? or animate the button? lmk Pooya72 1 Link to comment Share on other sites More sharing options...
qdrj Posted March 18, 2015 Share Posted March 18, 2015 Tweening scale will be easiest way i thinkbutton.events.onInputDown.add(this.onInputDown, this);function onInputDown(button) { game.add.tween(button.scale).to({x: 0.8, y: 0.8}, 200, Phaser.Easing.Cubic.Out, true) game.add.tween(button.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Cubic.Out, true, 200)} Link to comment Share on other sites More sharing options...
kemz Posted March 18, 2015 Share Posted March 18, 2015 you can refer to this example http://phaser.io/examples/v2/buttons/changing-the-frames . Link to comment Share on other sites More sharing options...
Recommended Posts