My journey becoming a Unity game developer: Laser prototype for Galaxy Invaders pt.2

Player shooting lasers at a minimum of 0.3 seconds per shot.
Laser adjusted to show where it should instantiate from.
Added an offset to the Laser to instantiate above the Player object when fired.
Lasers instantiating at 0.8 meters above the Player when fired.
Player able to shoot lasers in rapid fire.
Created a variable name canFire to see if the Player is allowed to shoot.
Set canFire to True at the beginning of the game.
Player must wait 0.3 seconds each shot through LaserDelay Coroutine.
LaserDelay coroutine created to wait 0.3 seconds, then turn canFire back on.
Lasers shooting at 0.3 seconds per shot.
Refactored the code creating a new method named FireLaser().
Lasers firing using the FireLaser() method.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rhett Haynes

Rhett Haynes

Learning to become a Unity game developer.