using UnityEngine;
using System.Collections;
public class Timer : MonoBehaviour {
//Variables
private float seconds = 0.0f;
private float minutes = 1.0f;
private float hours = 0.0f;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
public void Update()
{
seconds += time.deltatime;
if(seconds > 60)
{
minutes += 1;
seconds = 0;
}
if(minutes > 60)
{
hours += 1;
minutes = 0;
}
print("Hours: " + hours + " " + "Minutes: " + minutes + " " + "Seconds" + seconds);
}
}
I get the error : time doesn’t exists