Now we need some means of getting back to the main menu from within the game. We’ll add this in the form of a menu that the player can open by pressing the Esc key. It also wouldn’t hurt for that menu to pause the game while it’s up and unpause when we close it.
Freezing Time
Everything in our game is based on time. We use “Time.deltaTime” to measure the distance something will move in a frame. We use “Time.time” to measure how long it’s been since something happened. We use Invokes to time the player’s ...