I need help making what should be simple modifications to a C# program that manages a very simple unity game for a class exercise.
I need to make it so that there is a button that allows the player to choose to play the game again, and also how to make it so a timer displays when the game is over that displays how long it took to finish the game. I can get so close I THINK but I can't get either working. Any tips would be appreciated.
using UnityEngine;
public class GameManager : MonoBehaviour
{
public GoalScript blue, green, red, orange;
private bool isGameOver = true;
void Update()
{
// If all four goals are solved then the game is over
}
void OnGUI()
{
if (isGameOver)
{
Rect rect = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 50, 200, 75);
GUI.Box(rect, "Game Over");
GUI.Label(rect, "Good Job!");
}
}
}