2025-11-12 18:39:09 +08:00
|
|
|
using System;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
2025-11-13 08:57:19 +08:00
|
|
|
namespace Tuan.GameScripts.Main
|
2025-11-12 18:39:09 +08:00
|
|
|
{
|
2025-11-13 08:57:19 +08:00
|
|
|
public class LoadingWindow : UIBase, IProgress<float>
|
2025-11-12 18:39:09 +08:00
|
|
|
{
|
2025-11-13 08:57:19 +08:00
|
|
|
public Slider slider;
|
|
|
|
|
public Text progressText;
|
|
|
|
|
public void Report(float value)
|
|
|
|
|
{
|
|
|
|
|
slider.value = value;
|
|
|
|
|
progressText.text = $"{value * 100:F0}%";
|
|
|
|
|
Debug.Log($"{gameObject.name};{value}");
|
|
|
|
|
}
|
2025-11-12 18:39:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
2025-11-13 08:57:19 +08:00
|
|
|
|