Hi, I need help with my players death and Time up UI. Basically I am trying to get a death UI with 2 buttons that says Restart or Quit. I wish that when my timer gets to 0 it pauses the game and brings up 2 buttons saying either to restart or quit. Here under is my timer script
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Timer : MonoBehaviour {
public Text timeText;
public float timer = 120.00f;//Countdown Timer
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
timer -= Time.deltaTime;
timeText.text = "" + timer.ToString ("00:00");
if (timer <= 0) {
Time.timeScale = 0;
timeText.text = "Game Over";
}
}
}