很简单的!float timer;
float nowtime =10;
public Text text;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
timer += Time.deltaTime;
if (timer >=1)
{
nowtime = nowtime - 1;
timer = 0;
}
text.text = nowtime + "";
if (nowtime == 0)
{
Time.timeScale = 0;
}
}