Gamespace: Restarting Game
I have set the Gamespace to restart whenever a player falls off the edge of the world or the health bar points have decreased to zero due to the rain cloud enemies. I found that if I put a cube underneath my landscape and the player collided with it (due to falling off) I could set the Gamespace to restart which means that the player does not need to manually restart the game by reloading the exe file. I made this cube invisible by removing the mesh renderer component as the Gamespace would look unprofessional and messy if the cube could be seen. A tag named 'Respawn' is attached to the cube so that it can be identified in the script. Restarting the Game by falling using collisions This is the inspector for the restart cube, a box collider has been added to the object so that the script can detect when the player has fallen off of the landscape. Restart Cube Inspector The 'Respawn' script detects when a collision has occurred with the invisible box...