// Use this for initialization void Start() { specialisationPanelmanager = SpecialisationPanelManager.instance; tooltipAbility = gameObject.GetComponent <AbilityTooltip>(); player = PlayerFinder.getPlayer(); PlayerFinder.playerChangedEvent += ChangePlayer; foreach (Transform child in transform) { if (child.name == "Sprite" && child.GetComponent <Image>()) { icon = child.GetComponent <Image>(); icon.sprite = ability.abilitySprite; } else if (child.name == "Frame") { } else if (child.name == "SkillName") { child.GetComponent <TextMeshProUGUI>().text = ability.abilityName; } } }
void Awake() { instance = this; }