Esempio n. 1
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            Container = t.FindEx("Container").gameObject;

            DynamicScroll = t.GetMonoILRComponent <LTChallengeInstanceBagScroll>("Container/BottomRight/Right/Scroll/PlaceHolder/Grid");
            DynamicScroll.SetOnBtnClickAction(OnSkillScrollItemClick);
            FirstBagCell   = DynamicScroll.mDMono.transform.GetMonoILRComponent <LTChallengeInstanceBagCell>("Row/Item");
            ScrollTipsGO   = t.GetComponent <TweenScale>("Container/SkillTips");
            SkillTipsItem  = t.GetMonoILRComponent <LTShowItem>("Container/SkillTips/TweenHUD/UpGroup/LTShowItem");
            SkillNameLabel = t.GetComponent <UILabel>("Container/SkillTips/TweenHUD/UpGroup/Label");
            CostMagicLabel = t.GetComponent <UILabel>("Container/SkillTips/TweenHUD/UpGroup/Magic/Label");
            DescLabel      = t.GetComponent <UILabel>("Container/SkillTips/TweenHUD/Desc");

            t.GetComponent <UIButton>("Container/BottomRight/Bg/Top/RuleBtn").onClick.Add(new EventDelegate(OnRuleBtnClick));
            t.GetComponent <UIButton>("Container/BottomRight/Bg/Top/CancelBtn").onClick.Add(new EventDelegate(OnClose));
            t.GetComponent <UIButton>("Container/SkillTips/TweenHUD/UseBtn").onClick.Add(new EventDelegate(OnUseSkillBtnClick));

            GameObject go  = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item").gameObject;
            GameObject go1 = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item (1)").gameObject;
            GameObject go2 = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item (2)").gameObject;
            GameObject go3 = t.FindEx("Container/BottomRight/Right/Scroll/PlaceHolder/Grid/Row/Item (3)").gameObject;

            t.GetComponent <UIEventTrigger>("Container/Background").onClick.Add(new EventDelegate(OnClose));
        }
Esempio n. 2
0
 private void Create(List <LTChallengeInstanceBagData> itemDatas)
 {
     itemDatas[0].IsSelect = true;
     CurrentSelected       = FirstBagCell;
     SetSkillTipInfo(itemDatas[0]);
     DynamicScroll.SetItemDatas(itemDatas);
 }
Esempio n. 3
0
        private void InitSkillTips(List <LTChallengeInstanceBagData> list)
        {
            if (list.Count <= 0)
            {
                SkillTips.HideUI();
                return;
            }

            ShowSkillTips(list[0]);

            curBagCell       = FirstBagCell;
            list[0].IsSelect = true;
        }
Esempio n. 4
0
        public void OnSkillScrollItemClick(LTChallengeInstanceBagCell cell)
        {
            if (string.IsNullOrEmpty(cell.CellData.Id))
            {
                return;
            }
            FusionAudio.PostEvent("UI/General/ButtonClick", true);
            if (CurrentSelected != null)
            {
                CurrentSelected.CellData.IsSelect = false;
                CurrentSelected.SetItemSelect(false);
            }

            CurrentSelected = cell;
            CurrentSelected.CellData.IsSelect = true;
            CurrentSelected.SetItemSelect(true);

            SetSkillTipInfo(CurrentSelected.CellData);
        }
Esempio n. 5
0
        public void OnBagCellClick(LTChallengeInstanceBagCell bagCell)
        {
            //FusionAudio.PostEvent("UI/General/ButtonClick", true);
            if (string.IsNullOrEmpty(bagCell.CellData.Id))
            {
                return;
            }
            FusionAudio.PostEvent("UI/General/ButtonClick", true);
            //FusionAudio.PostEvent("UI/General/ButtonClick");
            if (curBagCell != null)
            {
                curBagCell.CellData.IsSelect = false;
                curBagCell.SetItemSelect(false);
            }

            curBagCell = bagCell;
            curBagCell.CellData.IsSelect = true;
            curBagCell.SetItemSelect(true);

            SkillTips.Init(curBagCell.ShowItem.LTItemData);
        }