I have this code which makes a counter, that adds 1 to an integer every 30 minute. Now i would like to display this counter in my main menu scene so that you can see how much time there is to next “energy”, how would i do this ?
Here is the code.
static var energyObj : int = 5;
var counter : float;
function Update () {
counter += Time.deltaTime;
if(counter > 1800){
energyObj += 1;
counter = 0.0;
Debug.Log("Energy is " + energyObj);
}