Files
Gazuaa/Assets/Scripts/GameManager.cs

32 lines
812 B
C#
Raw Normal View History

2026-05-01 04:07:22 +09:00
using System.Collections;
using TMPro;
2026-05-01 04:03:39 +09:00
using UnityEngine;
public class GameManager : MonoBehaviour
{
2026-05-01 04:07:22 +09:00
public TextMeshProUGUI text;
public GameObject readyPanel;
public GameObject ready;
2026-05-01 04:03:39 +09:00
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
2026-05-01 04:07:22 +09:00
StartCoroutine(GameSet());
2026-05-01 04:03:39 +09:00
}
2026-05-01 04:07:22 +09:00
private IEnumerator GameSet()
2026-05-01 04:03:39 +09:00
{
2026-05-01 04:07:22 +09:00
yield return new WaitForSeconds(3f);
text.text = "3";
yield return new WaitForSeconds(1f);
text.text = "2";
yield return new WaitForSeconds(1f);
text.text = "1";
yield return new WaitForSeconds(1f);
text.text = "GO!";
readyPanel.SetActive(false);
yield return new WaitForSeconds(3f);
ready.SetActive(false);
2026-05-01 04:03:39 +09:00
}
}