Day 8 — Speed Boost and Spawning Power Ups
The next task I went into was getting the next Power Up working.

Getting the Power Ups to spawn was just adding in another Coroutine to the Spawn Manager and deciding to do a Random value between the three power ups I currently have.

Using a Switch Statement — Similar to an If Else statement, you have a “Statement” that you want to check and the “Case(s)” are the else if part. So in an if statement it would be:
if(powerUp == “a string”) then
else if(powerUp == “a different string”) code here
A switch statement allows for a cleaner format for certain if else statements. In this situation I am checking strings, using the power up tags to inform the player what to activate when it collects said power up.
Another part down, on to the next. Getting the User Interface up and running.