Day 2: Giving the Player a Laser
Today I was able to give my player a laser. I use instantiate() to spawn the laser slightly in front of the player when they press the spacebar and then use transform.translate() to get the laser moving. I use Destroy() to get rid of the laser when it goes off screen. The laser also has a delay using Time.time to prevent the player from spamming the lasers. I am having a blast and can’t wait to share more.