void Start() { // Set the icon (must be in Start, since Awake runs before `skill` is set). Sprite skillIcon = getIconByName(skill.iconName); skillImage.sprite = skillIcon; skillInfoObj = PrefabInstantiator.P.CreateSkillInfo(skill, transform); skillInfoObj.SetActive(false); updateThisSkillButton(); turnListenerId = fightState.addTurnListener(updateThisSkillButton); actionListenerId = fightState.addActionListener(updateThisSkillButton); cuedSkillListenerId = fightState.addCuedSkillListener(updateThisSkillButton); shineListenerId = fightState.addCuedSkillListener(updateThisSkillButtonShine); }
void Start() { updateThisActionOrb(); fightState.addActionListener(updateThisActionOrb); fightState.addCuedSkillListener(updateThisActionOrb); }