2026-06-19 UI, UI로직

This commit is contained in:
skrwns304@gmail.com
2026-06-19 14:27:40 +09:00
parent b751a9ed66
commit b1e85a5b89
549 changed files with 18058 additions and 20 deletions

View File

@@ -0,0 +1,42 @@
using TMPro;
using UnityEngine;
public class MazeUIManager : MonoBehaviour
{
[Header("Result UI")]
[SerializeField] private GameObject rewardPanel;
[SerializeField] private TextMeshProUGUI rewardText;
private void Awake()
{
HideReward();
}
public void ShowSuccess()
{
ShowResult("SUCCESS!", Color.green);
}
public void ShowFail()
{
ShowResult("FAIL!", Color.red);
}
private void ShowResult(string message, Color color)
{
if (rewardPanel != null)
rewardPanel.SetActive(true);
if (rewardText != null)
{
rewardText.text = message;
rewardText.color = color;
}
}
public void HideReward()
{
if (rewardPanel != null)
rewardPanel.SetActive(false);
}
}