34 lines
598 B
C#
34 lines
598 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);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|