private void Update() { if (this.cur < 0) { this.line.transform.localScale = Vector3.zero; return; } this.line.transform.localScale = Vector3.one; if (this.m_fOver) { if (this.m_scroll_bar.fillAmount >= 1f) { this.m_funcCallBack(); UnityEngine.Object.Destroy(base.gameObject); } this.m_scroll_bar.fillAmount = this.m_scroll_bar.fillAmount + Time.deltaTime * 3f; if (this.m_scroll_bar.fillAmount >= 1f) { this.m_scroll_bar.fillAmount = 1f; } } else if (this.realT) { float fillAmount = (float)this.cur / (float)this.max; this.m_scroll_bar.fillAmount = fillAmount; } else { float num = (float)this.cur / (float)this.max; if (this.m_scroll_bar.fillAmount < num) { this.m_scroll_bar.fillAmount += Time.deltaTime * 0.2f; } if (this.m_scroll_bar.fillAmount > num) { this.m_scroll_bar.fillAmount = num; } if (this.m_scroll_bar.fillAmount >= 0.9f) { this.m_scroll_bar.fillAmount = 0.9f; } } this.tick++; if (this.tick > 3) { this.tick = 0; if (this.state != 0) { if (this.state == 1) { if (this.tempTick > 3) { this.tempTick = 1; } this.lineTxt.text = ContMgr.getOutGameCont("init" + this.tempTick, new string[] { (int)((float)this.cur / (float)this.max * 100f) + string.Empty }); this.tempTick++; } else if (this.state == 2) { if (this.tempTick > 3) { this.tempTick = 1; } this.lineTxt.text = ContMgr.getOutGameCont("loading" + this.tempTick, new string[] { (int)((float)this.cur / (float)this.max * 100f) + string.Empty }); Debug.Log("load::" + (int)(this.m_scroll_bar.fillAmount * 100f)); this.tempTick++; } } } }
public void onfail(string error) { this.m_scroll_bar.fillAmount = 0f; this.showComfirm(ContMgr.getOutGameCont("error", new string[0]), new Action(this.onClick)); }