using QFramework; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class LoadShow : MonoSingleton { public int allDownLoad; public Text text; public GameObject view; float progress; void Start() { } // Update is called once per frame void Update() { if (view.activeSelf) { progress = (float)(allDownLoad - (DownLoadManage.Instance.AllDownLoad + DownLoadManage.Instance.NowDownLoad)) / (float)allDownLoad*100; text.text = progress.ToString("F2")+"%"; } } public void ViewShow(bool state) { view.SetActive(state); } }