/// <summary> /// 根据传进来的值 显示技能信息 /// </summary> /// <param name="skill"></param> public void Init(Model_Skill skill) { if (skill != null) { skillIcon.sprite = Resources.Load <Sprite>(skill.skillSprite); skillIcon.gameObject.SetActive(true); //技能还在冷却 if (skill.skillCurrentCD < skill.skillCD) { SkillCD(true); } else { SkillCD(false); } } else { SkillCD(false); skillIcon.gameObject.SetActive(false); } }
public void InitUI() { item = GetComponent <Ctrl_PickUp>().Item; skill = GetComponent <Ctrl_PickUp>().Skill; if (item != null) { ShowIcon(); _ImgIcon.sprite = Resources.Load <Sprite>(item.sprite); _Amount.text = item.currentNumber.ToString(); } else if (skill != null) { ShowIcon(); _ImgIcon.sprite = Resources.Load <Sprite>(skill.skillSprite); _Amount.text = skill.skillCurrentLv.ToString(); } if (item == null && skill == null) { HideIcon(); } }
/// <summary> /// 显示技能 /// </summary> /// <param name="skill"></param> public void ShowPickUp(Model_Skill skill) { PickUp.GetComponent <Ctrl_PickUp>().Skill = skill; IsPicked = true; }
/// <summary> /// 技能等级提升 /// </summary> /// <param name="skill"></param> public void UpdateSkillLv(Model_Skill skill) { skillLv.text = skill.skillCurrentLv + "/" + skill.skillMaxLv; }
/// <summary> /// 更改技能 /// </summary> /// <param name="skill"></param> public void ChangeSkill(Model_Skill skill) { viewPickUp.ChangeSkill(skill); }