Talking to the Rubber Duck:
-
Within public class, making it available globally within the entire script.
a. Identifying the number of steps as an integer and in increments of one.
b. Using vector math, identifying the location of Home and Player. -
The start function is calling the Welcome Message.
-
The welcome message is comprised only of print statements. Since the problem is that the game continues after it completes, then this area cannot be the problem.
-
The update is called every frame which is essentially every time the player moves one step.
a. If the input is down, up, left, or right arrow respectively then calculate the current player location using the player location, plus increment in whichever direction the player moved. The variables applied with vector math gives a new value which is printed to the console. -
The PrintUpdateandContinue function is called every frame, after the player location is worked out.
a. When the game is over we have a print statement which is designed to print to the console āGame Overā. This must be where the problem is because it simply is printing the words to the console and nothing to end the program.
So, we need something to prevent the user the ability to continue the game. This is different than terminating the game with the ESC key, which can be added later unless using iOS. Time to look through Unity Docsā¦
I found a reference at the following url:
However, the solution seems to be beyond the scope of our project so I will post this and have a look at the answer in the course video. I donāt currently understand what is needed to resolve the problem.
Update: After watching the course video, I see that the solution is very easy. LOL.