public void UpdateModel() { if (model == null) { return; } intro_text.text = model._config.skill_des.Replace("t", "<color=#FF9A00>" + (int)model.GetHurtValue() + "</color>"); double needMoney = 0; if (!model.IsLearn()) { needMoney = model.GetLearnMoney(); level_up_button.GetComponentInChildren <Text>().text = "学习"; level_up_info_text.text = "学习需要金钱:" + ((ActorModel.Model.GetMoney() >= needMoney) ? "<color=green>" : "<color=red>") + needMoney + "</color>"; } else { needMoney = model.GetLevelUpMoney(); level_up_button.GetComponentInChildren <Text>().text = "升级"; level_up_info_text.text = DreamerUtil.GetColorRichText("\t\t等级:" + model.GetSkillLevel(), Color.white) + "\n升级所需金钱: " + ((ActorModel.Model.GetMoney() >= needMoney) ? "<color=green>" : "<color=red>") + needMoney + " </color>"; } level_up_button.interactable = ActorModel.Model.GetMoney() >= needMoney; level_up_button.GetComponentInChildren <Text>().color = ActorModel.Model.GetMoney() >= needMoney ? Color.yellow : Color.gray; }