컴퓨터 수정

This commit is contained in:
dldydtn9755-crypto
2026-07-15 12:53:00 +09:00
parent 1b74e347bf
commit 07cc9267a8
16 changed files with 124 additions and 7 deletions

View File

@@ -0,0 +1,41 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class MainProgressUI : MonoBehaviour
{
[Header("진행도 채움 이미지")]
public Image progressFill;
[Header("퍼센트 텍스트")]
public TMP_Text percentText;
[Header("메인 진행도")]
[Range(0, 100)]
public int progressPercent = 0;
private void Start()
{
SetProgress(progressPercent);
}
public void SetProgress(int percent)
{
progressPercent = Mathf.Clamp(percent, 0, 100);
if (progressFill != null)
{
progressFill.fillAmount = progressPercent / 100f;
}
if (percentText != null)
{
percentText.text = progressPercent + "%";
}
}
public void AddProgress(int amount)
{
SetProgress(progressPercent + amount);
}
}