Day 54: Wave System Part 2

Objective: Add a UI that let’s the players know wave what it is.

Yesterday was all about setting up the logic for enemies to spawn enemies each wave. Now lets integrate the UI into it!

To start off we’ll need a text object under the canvas.

To give it to the UIManager to change when needed we’ll need a reference to it.

Let’s create a function that’ll active this object for the wave and one for the boss.

We use the same object for each wave and the incoming boss. Once the function is called it’ll set the game object to true, display the text and start the coroutine. The coroutine will set the object back to false.

Now in our spawn manager we need to get a reference to the UIManager.

Next is to call the functions in the UIManager when needed.

Just don’t forget to assign it in the inspector.

To have a better looking asteroid, We can spawn the asteroid above the screen and animate it to move down into view.

With the asteroid selected we’ll create a new animation. We’ll record moving it from top of the screen to where we want it to stop. That’s it.

Thank you for reading! Have a wonderful day!

I am passonate on learning to program and use Unity to become a skillful Unity Developer