Then with the player selected in the hierarchy look at the apply button if we click on the apply button what that will do is if we have a prefab the changes we have made to the objects or scripts will update to the prefabs.

Now to move onto spawning enemies to start with go to the hierarchy and create empty object and name it enemymanager then create a script name Enemymanager and drag it onto the EnemyManager in the hierarchy now create another empty in the hierarchy and rename it CubeBotSpawnPoint and position it in the scene view to wherever you want the enemies to spawn from. 

So now if you click on the EnemyManager in the hierarchy you will see some boxes with None in which we don’t want so click and drag the player from the hierarchy onto the player health property in the EnemyManager which will link it to the player health script so that enemies only spawn while the player is alive then there’s another section for enemies so take a cubebot or enemy from either the hierarchy or a prefab and drag it into the enemy properties and a spawn time tab should appear with the number 3 which will be the length of time it takes for a new enemy to appear then take the CubeBotSpawnPoint from the hierarchy and drag it onto the name spawn points.

Comments

Popular posts from this blog