Step 2

Shooting lasers from the ship


Next, complete the code as shown to get our ship to shoot some lasers!

In this example, a simple square was drawn for the projectile/laser, feel free to make it whatever you want.

Testing the code


Go ahead and test out the code. Your ship should now be shooting lasers!