/// <summary> /// 技能初始化 /// </summary> /// <param name="skill"></param> public void Init(FightSkill skill) { this.skill = skill; Sprite sp = Resources.Load<Sprite>("SkillIcon/" + skill.Code); background.sprite = sp; mask.gameObject.SetActive(true); }
private FightSkill[] InitSkill(int[] value) { FightSkill[] skills = new FightSkill[value.Length]; for (int i = 0; i < value.Length; i++) { int skillCode = value[i]; SkillDataModel data = SkillData.skillMap[skillCode]; SkillLevelData skillLevel = data.levels[0]; FightSkill skill = new FightSkill(skillCode, 0, skillLevel.level, skillLevel.range, skillLevel.time, data.name, data.info, data.target, data.type); skills[i] = skill; } return skills; #endregion }