using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class CountDown : MonoBehaviour
{
public float timeLeft = 10;
public Text text;
public GameObject resultsPanel;
public GameObject[] panels;
private int numberOfCorrectAnswers;
public Text resultsText;
void Update()
{
timeLeft -= Time.deltaTime;
text.text = "Time Left:" + Mathf.Round(timeLeft);
if (timeLeft < 0)
{
foreach (GameObject p in panels)
{
p.SetActive(false);
}
resultsPanel.SetActive(true);
displayResults();
}
}