- Home /
Question by
rudisky · Aug 02, 2016 at 12:05 PM ·
timer countdowntimer-script
how to timer count down and then count up
Hi i have the next timer and i need to do some other features with the timer. The main idea is start on 60 count down to 0 when the timer gate 30 change the font color to red and when it get 0 display a message and start increasing the number (countup).
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Timmer : MonoBehaviour {
public Text Tempo;
public float tiempo = 0.0f;
// Update is called once per frame
void Update () {
tiempo -= Time.deltaTime;
Tempo.text = "Tiempo:" + " " + tiempo.ToString ("f0");
}
}
Comment
Your answer
Follow this Question
Related Questions
Game automatically loses before the timer starts 1 Answer
error : CS1061 Type `int' does not contain a definition for `time' and no extension method 0 Answers
Speed up timer 1 Answer
Unity 5 - Adding a Pre-made Countdown Timer C# Script to the Game Scene as a Text UI Element 1 Answer
Stop and Pause Timer 2 Answers