_xiaofang/xiaofang/Assets/Script/task/task.cs
2024-12-11 14:24:06 +08:00

39 lines
639 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class task : MonoBehaviour
{
private Text taskte;
private float timer = 0;
private void Start()
{
taskte = this.GetComponent<Text>();
}
private void Update()
{
timer += Time.deltaTime;
if (timer>1 && TaskMgr.instance.taskbool)
{
TaskMgr.instance.setText(taskte);
timer = 0;
}
//taskte.text = Time.deltaTime.ToString("F2");
//Debug.Log(taskte.text);
}
public void SetInfo()
{
}
}