Adding Thrusters through use of a key.
Aug 29, 2021
Since like our Speed power-up, we want our player to gain speed; this time, through the use of a key; we will need to create another variable. In our player script add a variable such as:
To have our player move at 2.5 times normal speed; when we press the Left Shift key; we just need to add the following code to our player script in the playerMovement() method.