| | |
| | |
|
| | | private void Awake()
|
| | | {
|
| | | if (InGameDownLoad.Instance.dominantState != InGameDownLoad.Dominant.None
|
| | | && InGameDownLoad.Instance.state != InGameDownLoad.State.Completed)
|
| | | if (!InGameDownLoad.Instance.hasReward
|
| | | && InGameDownLoad.Instance.completeDownLoadAccount == PlayerDatas.Instance.baseData.AccID)
|
| | | {
|
| | | this.gameObject.SetActive(true);
|
| | | m_ProgressText.gameObject.SetActive(true);
|
| | | m_ProgressText.text = "100%";
|
| | | this.gameObject.SetActive(true);
|
| | | }
|
| | | else if (!InGameDownLoad.Instance.hasReward
|
| | | && InGameDownLoad.Instance.completeDownLoadAccount == PlayerDatas.Instance.baseData.AccID)
|
| | | else if (InGameDownLoad.Instance.dominantState != InGameDownLoad.Dominant.None)
|
| | | {
|
| | | m_ProgressText.gameObject.SetActive(true);
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(progress, "%");
|
| | | this.gameObject.SetActive(true);
|
| | | m_ProgressText.gameObject.SetActive(true);
|
| | | if (InGameDownLoad.Instance.state != InGameDownLoad.State.Completed)
|
| | | {
|
| | | m_ProgressText.text = "100%";
|
| | | }
|
| | | else
|
| | | {
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(progress, "%");
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | case InGameDownLoad.State.Completed:
|
| | | this.gameObject.SetActive(false);
|
| | | m_ProgressText.gameObject.SetActive(false);
|
| | | break;
|
| | | case InGameDownLoad.State.None:
|
| | | case InGameDownLoad.State.Prepared:
|
| | |
| | | case InGameDownLoad.State.Award:
|
| | | this.gameObject.SetActive(true);
|
| | | m_ProgressText.gameObject.SetActive(true);
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(progress, "%");
|
| | | m_ProgressText.text = "100%";
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | private void UpdateDownLoadProgress()
|
| | | {
|
| | | m_ProgressSlider.fillAmount = InGameDownLoad.Instance.progress;
|
| | |
|
| | | if (InGameDownLoad.Instance.state == InGameDownLoad.State.DownLoad)
|
| | | if (m_ProgressText != null)
|
| | | {
|
| | | if (m_ProgressText != null)
|
| | | if (InGameDownLoad.Instance.state == InGameDownLoad.State.Award)
|
| | | {
|
| | | m_ProgressText.text = "100%";
|
| | | }
|
| | | else
|
| | | {
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(Mathf.Clamp(progress, 0, 99), "%");
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OpenInGameDownloadWin()
|