This commit is contained in:
2025-11-03 12:03:21 +08:00
parent 3ba6a928cd
commit 75fb982872
25 changed files with 616 additions and 16 deletions

View File

@@ -11,5 +11,32 @@ public class PatchWindow : MonoBehaviour
private void Awake()
{
video.targetCamera = GameManager.Inst.UICamera;
PatchEvent.OnStatusUpdate += OnStatusUpdate;
PatchEvent.OnProgressUpdate += OnProgressUpdate;
PatchEvent.OnDownloadSizeUpdate += OnDownloadSizeUpdate;
}
private void OnDestroy()
{
PatchEvent.OnStatusUpdate -= OnStatusUpdate;
PatchEvent.OnProgressUpdate -= OnProgressUpdate;
PatchEvent.OnDownloadSizeUpdate -= OnDownloadSizeUpdate;
}
private void OnStatusUpdate(string status)
{
if (statusText != null)
statusText.text = status;
}
private void OnProgressUpdate(float progress)
{
if (progressBar != null)
progressBar.value = progress;
}
private void OnDownloadSizeUpdate(string sizeText)
{
if (downloadSizeText != null)
downloadSizeText.text = sizeText;
}
}