26 lines
613 B
C#
26 lines
613 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using TMPro;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class EnviromentUIControl : MonoBehaviour
|
||
|
{
|
||
|
public GameObject agentObj;
|
||
|
public TextMeshProUGUI remainTimeText;
|
||
|
private AgentWithGun agentScript;
|
||
|
|
||
|
// Start is called before the first frame update
|
||
|
void Start()
|
||
|
{
|
||
|
agentScript = agentObj.GetComponent<AgentWithGun>();
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
int remainTime = agentScript.remainTime;
|
||
|
remainTimeText.text = "RemainTime:" + remainTime.ToString();
|
||
|
}
|
||
|
}
|