_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Battle_Royale/HegemonTime.cs

34 lines
666 B
C#
Raw Normal View History

2024-11-12 14:06:34 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HegemonTime : MonoBehaviour
{
public Text timeText;
public int timeNum;
// Start is called before the first frame update
void Start()
{
timeNum = 60;
StartCoroutine(StartGame());
}
private void Update()
{
}
private IEnumerator StartGame()
{
while (timeNum >=0)
{
timeText.text = timeNum.ToString(); // <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
yield return new WaitForSeconds(1f); // <20>ȴ<EFBFBD>1<EFBFBD><31>
timeNum -= 1;
}
timeNum = 60;
}
}