Example #1
0
 private void OnEnable()
 {
     MtaManager.TrackBeginPage(MtaType.SellHeroWindow);
     commonWindow = WindowManager.Instance.GetWindow<UIHeroCommonWindow>();
     commonWindow.ShowSelMask(false);
     commonWindow.NormalClicked = OnNormalClick;
     RefreshSelAndSoul();
     GetTeamMembers();
     CacheCannotSellList();
     UpdateSelAndCanNotSellMasks();
     InstallHandlers();
     HeroConstant.EnterType = HeroConstant.HeroDetailEnterType.SellHero;
     sellLis.GetComponent<UIButton>().isEnabled = false;
 }
Example #2
0
 // Use this for initialization
 void Awake()
 {
     var activeSkill = Utils.FindChild(transform, "ActiveSkill");
     activeSkillName = activeSkill.Find("Name").GetComponent<UILabel>();
     activeSkillDesc = activeSkill.Find("Desc").GetComponent<UILabel>();
     var leaderSkill = Utils.FindChild(transform, "LeaderSkill");
     leaderSkillName = leaderSkill.Find("Name").GetComponent<UILabel>();
     leaderSkillDesc = leaderSkill.Find("Desc").GetComponent<UILabel>();
     commonWindow = WindowManager.Instance.GetWindow<UIHeroCommonWindow>();
     equipItems = new GameObject[MaxEquipCount];
     const string equipPrefix = "HeroEquip";
     var itemsContainer = transform.Find("Container items");
     for (var i = 0; i < MaxEquipCount; i++)
     {
         equipItems[i] = itemsContainer.Find(equipPrefix + i).gameObject;
     }
     foreach(var item in equipItems.Select(equipItem => equipItem.GetComponent<HeroEquipControl>()))
     {
         item.ClickedHandler = OpenSelectHandler;
     }
     highLightFrame = itemsContainer.Find("HighLightFrame").gameObject;
     NGUITools.SetActive(highLightFrame, false);
 }
 // Use this for initialization
 private void Awake()
 {   
     addLis = UIEventListener.Get(transform.Find("Buttons/Button-Add").gameObject);
     addButton = addLis.GetComponent<UIButton>();
     subLis = UIEventListener.Get(transform.Find("Buttons/Button-Sub").gameObject);
     subButton = subLis.GetComponent<UIButton>();
     levelUpLis = UIEventListener.Get(transform.Find("Buttons/Button-LvlUp").gameObject);
     levelUpButton = levelUpLis.GetComponent<UIButton>();
     nextCostTitle = Utils.FindChild(transform, "NextSoul").GetComponent<UILabel>();
     nextCostValue = nextCostTitle.transform.Find("NextSoulValue").GetComponent<UILabel>();
     usedSoulTitle = Utils.FindChild(transform, "UsedSoul").GetComponent<UILabel>();
     usedSoulValue = usedSoulTitle.transform.Find("UsedSoulValue").GetComponent<UILabel>();
     ownedSoulValue = Utils.FindChild(transform, "OwnedSoulValue").GetComponent<UILabel>();
     commonWindow = WindowManager.Instance.GetWindow<UIHeroCommonWindow>();
 }