Objective: Determine the purpose of using Coroutines in Unity, what are Coroutines.

Lets begin, for our game, we have a spawn manager that runs every 5 seconds to spawn a new enemy, the above coroutine accomplishes this.

--

--

Objective: Understand the difference between a collision, and a trigger in terms of Unity.

taking the box collider 2D of our enemy, we see the Is Trigger option is checked, this will allow a collision via a trigger, you can pass into the bounding box without bouncing off the object.

--

--

Objective: Figure out a way to code a cooldown system, so you cannot just spam lasers the entire time.

in this ShootBullet() method, that is called when the player hits the spacebar, via the player’s Update() method, we have a variable called fireDelay, which takes the current time since the game launched, and adds our fireRate variable to the time.

--

--

Objective: learn how writing pseudo code and help you get to the solution of your problem faster.

Ok, so we take for example pseudo code for writing our enemy spawner, we know what we need to do in plain English, now how do we write that in code?

--

--