// Update void OnHeroSwitch(GameObject hero, GameObject reciever = null) { _heroAbilities = hero.GetComponent <AbilityManager>(); _heroStats = hero.GetComponent <BasicStatManager>(); // Setup ability ui if (_heroAbilities != null) { Ability1UI.Enable(); Ability2UI.Enable(); Ability1UI.SetUIElements(_heroAbilities.Ability1.AbilityName, _heroAbilities.Ability1.UISprite); Ability2UI.SetUIElements(_heroAbilities.Ability2.AbilityName, _heroAbilities.Ability2.UISprite); } else { Ability1UI.Disable(); Ability2UI.Disable(); } if (_heroStats != null) { HeroNameText.text = _heroStats.name; } // Move marker to current hero }