siemacieslak Posted April 28, 2014 Share Posted April 28, 2014 Hello again. I have another question, i couldn't figure it out by myself. This is my code for determining if desired key was pressed: update: function() { if (this.key.isDown(this.desiredKeyCode - 32)) { console.log('pressed desired key'); } }, Is there possibility to find out if player pressed key different from desired one and which one was it? Link to comment Share on other sites More sharing options...
marvster Posted April 28, 2014 Share Posted April 28, 2014 Have a look at this: http://www.html5gamedevs.com/topic/5905-what-is-function-check-any-key-press-in-phaser/this.game.input.keyboard.onDownCallback = function(e) { console.log(e.keyCode); } siemacieslak 1 Link to comment Share on other sites More sharing options...
siemacieslak Posted April 28, 2014 Author Share Posted April 28, 2014 Yes! That's what i was searching for. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts