Day 12 of my Developer Journey: Triple Shot Powerup code

Triple Shot is now a game object, time to give it its behavior. Since it is very similar to the enemy script, I will reuse most of what we already know to create the behavior required with a few changes. First, once this powerup gets to the bottom of the screen, it will not respawn at the top, this is to simulate that the player only has 1 chance to grab it. Secondly it will move downwards slower than the enemies.

Movement script

Other than that, our powerup will disappear once it touches the player.

Collision script

--

--