public override void SetItemController(WarUI root) { rootUI = root; root.onHeroSwitch += OnHeroSelected; WarClientManager mgr = WarClientManager.Instance; if (mgr != null) { ClientNPC npc = mgr.clientTeam.get(index); if (npc != null) { cachedNpc = npc; npc.animState.HeroHealthBar = health; string name = "head_" + npc.data.configData.model; head.spriteName = name; } else { gameObject.SetActive(false); } } }
public override void SetItemController(WarUI root) { rootUI = root; root.onHeroSwitch += OnHeroSelected; }
public abstract void SetItemController(WarUI root);