Nerd For Tech
Published in

Nerd For Tech

Creating waves of enemies

Now that we are nearing the end of our game, let’s look at how to get a wave system in place so that we can have it lead up to our boss enemy. To start, we need to create some new text in our canvas to let the player know when a new wave is starting up. From there, we can go into our SpawnManager script and start adding in some new variables to work with:

From here, we are going to set our wave to 0 along with connect to our UiManager so that we can link to the new text that we have on our canvas:

Within our SpawnEnemyRoutine, we are going to add a quick line of text to let us know when our enemy count is higher:

From here, we can create a new void to work with that will control how much we spawn along with when the new waves start:

With this void, what we are going is increase our wave count, which will increase the Wave number in our UI script. For the last part of our changes to the SpawnManager script, we are going to add this new routine to the spawn void and remove our SpawnEnemyRoutine:

Finally, we will move over to our UI script and add in the method to let our player know that it has advanced to a new wave:

Now that we have all of this in place, we can take a look at our game in the editor and see how it looks:

Now that we have a wave system in place, we can look at working on our final boss of the game.




NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit

Recommended from Medium

How to Document Software

How to easily build, test, deploy and rollback a NodeJs app using SyncRelease

How to build a Powershell GUI — Part 1

What Is IOT (Internet of Things)?

Worst abuse of the C preprocessor

Gap Analysis: Execution Engines

Dev Blog Episode 2: Awol FX Game Menu: ACTIVATED

Image: Awol FX game menu. Has play, quit, and options buttons.

THM Putting it All Together

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jordan Evans

Jordan Evans

More from Medium

Understanding Big O

Setting Up Git

Switch Statements | C#

Adding proximity detection so enemies can ram player