My journey becoming a Unity game developer: Script Communication in Unity using GetComponent. Using a Spawn Manager for Galaxy Invaders pt.3

Enemies stop spawning when the Player dies.
StopSpawning variable created to check if enemies are spawning.
Setting the While() condition to check if stopSpawning equals false.
OnPlayerDeath() method created to stop spawning enemies when the player dies.
Spawn Manager variable used to call the OnPlayerDeath() method to stop spawning enemies.
Message sent out if the Spawn Manager is missing.
Enemies stop spawning when the Player dies.

--

--

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