//显示经验值 经验条 private void ShoweExbar() { PlayerTemplate pRow = (PlayerTemplate)DataTemplate.GetInstance().m_PlayerExpTable.getTableData(ObjectSelf.GetInstance().Level); _ExpBar.value = (float)ObjectSelf.GetInstance().Exp / (float)pRow.getExp(); _PlayerLevelTxt.text = ObjectSelf.GetInstance().Level.ToString(); StringBuilder str = new StringBuilder(); str.Append("<color=yellow>"); str.Append(ObjectSelf.GetInstance().Exp.ToString()); str.Append("</color>"); str.Append("/"); str.Append(pRow.getExp()); _ExpTxt.text = str.ToString(); }
/// <summary> /// 经验条更新 /// </summary> private void UpdateExbar() { PlayerTemplate pRow = (PlayerTemplate)DataTemplate.GetInstance().m_PlayerExpTable.getTableData(ObjectSelf.GetInstance().Level); if (Exbar != null) { Exbar.value = (float)ObjectSelf.GetInstance().Exp / (float)pRow.getExp(); } }