Jump to content

Determining which key was pressed


siemacieslak
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

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