unity--11 项目:倒计时提醒功能
发布时间
阅读量:
阅读量
要求:从某一特定时间点启动倒计时功能,例如02:00、01:59等,并将当前倒计时数值实时展示在Text组件中。

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
//必须引入ui命名空间
public class CountDownTimer : MonoBehaviour
{
//查找组件
Text text;
void Start()
{
text= GetComponent<Text> ();
text.text = "02:00";
}
void Update()
{
}
}
全部评论 (0)
还没有任何评论哟~
