//create
keyR = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.R);
//uipdate
if (keyR.isDown) {call_function();}
These working in 3.15.x but it is not working in 3.16.2, any sugestion, any change necesary ?
thks in avdance
//create
keyR = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.R);
//uipdate
if (keyR.isDown) {call_function();}
These working in 3.15.x but it is not working in 3.16.2, any sugestion, any change necesary ?
thks in avdance
Hi. The way I’ve done it in 3.16 is:
keyR = this.input.keyboard.addKey(“R”);
ok
thks tiko1711
I have solved the problem. It was a function mine
also your way :
keyR = this.input.keyboard.addKey('R'); //simple quotes
or this way:
keyR = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.R);
…working fine,
I had a problem when I call a function used .refreshbody(); It working in 3.15
solved.
thks for reply
@tijuinem That’s right. You can even use key code values.
Taken from official CHANGELOG.md:
KeyboardManager.addKey
can now take either a Key object, a string, such asA
orSPACE
, or a key code value.