using TMPro; using UnityEngine; using UnityEngine.UI; /// /// ¼ÓÔØUI /// public class UILoading : MonoBehaviour, IUIView { [SerializeField] private Image fillImage; [SerializeField] private TMP_Text text; [SerializeField] private bool _isCache; public bool IsCache => _isCache; public void Close() { transform.gameObject.SetActive(false); } public void Open(object data,bool isCache) { _isCache = isCache; if (!transform.gameObject.activeSelf) { Open(); } } public void Open() { transform.gameObject.SetActive(true); } public void Open(object data) { if(data is int value) { float v = value / 100; fillImage.fillAmount = v; text.text = string.Format("{0}%", value); } } }