2024-11-12 14:06:34 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class HegemonTime : MonoBehaviour
|
|
|
|
|
{
|
2024-11-13 02:03:11 +08:00
|
|
|
|
public static HegemonTime instance;
|
2024-11-12 14:06:34 +08:00
|
|
|
|
public Text timeText;
|
|
|
|
|
public int timeNum;
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
2024-11-13 02:03:11 +08:00
|
|
|
|
instance = this;
|
|
|
|
|
timeNum = 10;
|
2024-11-12 14:06:34 +08:00
|
|
|
|
StartCoroutine(StartGame());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2024-11-13 02:03:11 +08:00
|
|
|
|
public IEnumerator StartGame()
|
2024-11-12 14:06:34 +08:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
2024-11-13 02:03:11 +08:00
|
|
|
|
timeNum = 10;
|
|
|
|
|
Debug.Log("Boos<6F><73><EFBFBD><EFBFBD>");
|
|
|
|
|
BossContro.instance.BossMove();
|
2024-11-12 14:06:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|