private void OnExpUISync(string eventName, object udata) { UIExpInfo info = (UIExpInfo)udata; this.expProcess.fillAmount = (float)info.Exp / (float)info.Total; this.expLabel.text = info.Exp + " / " + info.Total; }
private void SyncExpUI() { this.uiBlood.SetLevel(this.level + 1); if (!this.isGhost) { UIExpInfo info = new UIExpInfo(); int now = 0, total = 0; GameConfig.ExpUpgradeLevelInfo(GameConfig .NormalHeroLevelConfigs, this._exp, ref now, ref total); info.Exp = now; info.Total = total; EventManager.Instance.DispatchEvent("exp_ui_sync", info); } }