public void active(FightSkill skill, Vector3 position) { icon.sprite = ResourceLoad.getSkillIcon(FightScene.player.heroId + "_" + skill.id); text.text = skill.name; info.text = skill.info; gameObject.transform.localPosition = position; gameObject.SetActive(true); }
public void setIcon(int hero, FightSkill skill) { this.skill = skill; Sprite sp = ResourceLoad.getSkillIcon(hero + "_" + skill.id); mask.sprite = sp; background.sprite = sp; mask.gameObject.SetActive(true); }