Day 13 of my Developer Journey: Tripleshot powerup implementation

Now that we have the basic code for how the powerup should function, we need to implement its behavior. We will do this by using a similar method to our damage method. In this case, we need a collision to change the state of our variable from false to true. This will make it active for 5 seconds and then switch it back to false, ending our coroutine.

Coroutine logic

The other part of the code is on the variable itself, which just communicates with the code above upon colliding with the player and preforming a null check.

Method trigger on the Powerup

--

--