ourcade / infinite-runner-template-phaser3

Starter template and example code from Infinite Runner in Phaser 3 with TypeScript book
MIT License
36 stars 24 forks source link

Mouse still flies up even when spacebar is up #2

Open jak6jak opened 3 years ago

jak6jak commented 3 years ago

Hello I was following the tutorial up to page 57 and I noticed that sometimes I am able to get the mouse to 'stick' to flying even when my space bar was up. It doesn't happen every time and is a bit difficult to trigger. (Usually when holding the space bar for extended period of time) here is the rocketMouse class code: https://pastebin.com/NEHcXuPt I changed the preupdate to an update to see if it fixed the bug but it didn't. I also changed the line if(this.cursors.space?.isDown) to if(this.cursors.space.isDown) to see if it might fix it but also no luck.

Thanks!