Beispiel #1
0
        private void Init()
        {
            RefreshVigor();

            InitData();
            InitCurData();
            InitBase();
            InitRefreshAction();

            var dataItems = (curDailyType == EDailyType.Limit) ? mDailyLimitData.ToArray() : mDailyAllDayData.ToArray();

            LTDailyDG.SetItemDatas(dataItems);
            curDailyCell = FirstCell;
        }
Beispiel #2
0
 private void RefreshActTime(int timerSequence)
 {
     mDailyLimitData = LTDailyDataManager.Instance.GetDailyDataByDailyType(EDailyType.Limit);
     if (curDailyType == EDailyType.Limit)
     {
         if (curDailyCell != null)
         {
             curDailyData.IsSelected = false;
             curDailyCell.SetSelectStatus(false);
         }
         InitCurData();
         InitBase();
         InitRefreshAction();
         LTDailyDG.SetItemDatas(mDailyLimitData.ToArray());
         curDailyCell = FirstCell;
     }
 }
Beispiel #3
0
        public void OnDailyItemClick(LTDailyCell cell)
        {
            if (curDailyCell != null)
            {
                if (curDailyCell == cell)
                {
                    return;
                }
                curDailyData.IsSelected = false;
                curDailyCell.SetSelectStatus(false);
            }
            curDailyCell            = cell;
            curDailyData            = cell.GetDailyData();
            curDailyData.IsSelected = true;
            curDailyCell.SetSelectStatus(true);

            curActData = curDailyData.ActivityData;
            InitBase();
        }
Beispiel #4
0
 public void OnAllDayTagClick()
 {
     if (curDailyType == EDailyType.AllDay)
     {
         return;
     }
     curDailyType = EDailyType.AllDay;
     if (mDailyAllDayData == null)
     {
         mDailyAllDayData = LTDailyDataManager.Instance.GetDailyDataByDailyType(EDailyType.AllDay);
     }
     if (curDailyCell != null && curDailyData != null)
     {
         curDailyData.IsSelected = false;
         curDailyCell.SetSelectStatus(false);
     }
     InitCurData();
     InitBase();
     LTDailyDG.SetItemDatas(mDailyAllDayData.ToArray());
     curDailyCell = FirstCell;
 }
Beispiel #5
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            LTDailyDG   = t.GetMonoILRComponent <LTDailyDynamicGrid>("DailyContent/List/ScrollView/Placeholder/Grid");
            RewardItems = new LTShowItem[controller.UiGrids["RewardGrid"].transform.childCount];

            for (var i = 0; i < controller.UiGrids["RewardGrid"].transform.childCount; i++)
            {
                RewardItems[i] = controller.UiGrids["RewardGrid"].transform.GetChild(i).GetMonoILRComponent <LTShowItem>();
            }

            FirstCell             = t.GetMonoILRComponent <LTDailyCell>("DailyContent/List/ScrollView/Placeholder/Grid/Item");
            titleCon              = t.GetMonoILRComponent <TitleListController>("DailyContent/Frame/UpButtons/Title");
            controller.backButton = t.GetComponent <UIButton>("UINormalFrameBG/CancelBtn");

            controller.FindAndBindingBtnEvent(new List <string>(3)
            {
                "DailyContent/Content/GotoBtn", "DailyContent/Frame/UpButtons/Title/BtnList/LimitBtn",
                "DailyContent/Frame/UpButtons/Title/BtnList/AllDayBtn"
            }, new List <EventDelegate>(3)
            {
                new EventDelegate(OnGotoBtnClick),
                new EventDelegate(OnLimitTagClick), new EventDelegate(OnAllDayTagClick)
            });

            controller.BindingCoolTriggerEvent(new List <string>(2)
            {
                "GetVitBtn", "GetVitBtn2"
            }, new List <EventDelegate>(2)
            {
                new EventDelegate(OnGetVitBtnClick), new EventDelegate(OnGetVitBtn2Click)
            });

            controller.CoolTriggers["GetVitBtn2"].transform.Find("CostLabel").GetComponent <UILabel>().text = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigValue("BuyDailyVigorCost").ToString();
            GetVitBtn2TimeLabel = controller.CoolTriggers["GetVitBtn2"].transform.Find("Label").GetComponent <UILabel>();
        }