BrunoHautenfaust Posted August 26, 2015 Share Posted August 26, 2015 I'm digging through the input tutorials. These don't work in my browser(Chrome). Tried with Edge - same thing.keyboard-justpressed << but works through localhostoverride-default-controls << doesn't work even through localhost Error: Uncaught TypeError: game.input.keyboard.justPressed is not a function.or other input stuff that are not a function. I tried this in my game:upKey = game.input.keyboard.addKey(Phaser.Keyboard.W);downKey = game.input.keyboard.addkey(Phaser.Keyboard.S);leftKey = game.input.keyboard.addKey(Phaser.Keyboard.A);ightKey = game.input.keyboard.addKey(Phaser.Keyboard.D); And it works. game.input.keyboard.createCursorKeys(); works, too. That's how I had it at first. UPDATE: Figured it out. Some previous version of Phaser had justPressed which in a newer version was updated to downDuration. And I saw that it's fixed in the source code at github. The one on the site is outdated. As for the override-default-controls tutorial, I've proposed some changes on gitHub.Everything's fine. in mono 1 Link to comment Share on other sites More sharing options...
Staafsak Posted August 29, 2015 Share Posted August 29, 2015 Yeah, it's good to download all the examples onto your computer. Then it will work for sure. Link to comment Share on other sites More sharing options...
Recommended Posts