Just completed the Argon Assault module and want to complete the game with a GAME OVER splash screen once all the enemy ships are destroyed via Destroy(gameObject, 0.5f);
I am trying to find a way of determining that all the enemy ships have been destroyed, but I canât quite get a handle on it.
Should I try and build an array of remaining enemies each time one is killed and then end the game when the array is empty?
I found this line, so I have tagged all my enemy ships as âEnemyâ.
GameObject enemies = GameObject.FindGameObjectsWithTag(âEnemyâ);
I thought it would fill an array with only active enemy ships but it doesnât seem to do that.
I have all my enemy ships in a Hierachy folder called âEnemy Shipsâ which empties out as each enemy ship is destroyed.
Is that some sort of array itself?
Any suggestions most welcome.
Cheers
Steve