How can I detect keypresses for a Flappy Bird game?
Not detecting when the player holds down the key.
There are a few ways, but probably you would create cursor keys and check isDown in scene update().
it is only using .isDown I want it to detect me pressing my key down and only fire once until the key is released and then repressed.
i did that but the player can just hold down the key and keep jumping.
See JustDown().
so load in cursors and replace “.isDown” with “.justDown”?
No, like in the linked example, replace with Phaser.Input.Keyboard.JustDown(someKey).
thanks that works!