Example #1
0
        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);
                }
            }
        }
Example #2
0
 public override void SetItemController(WarUI root)
 {
     rootUI             = root;
     root.onHeroSwitch += OnHeroSelected;
 }
Example #3
0
 public abstract void SetItemController(WarUI root);