示例#1
0
        public override void Awake()
        {
            base.Awake();
            controller      = mDMono.transform.parent.parent.parent;
            ContentObj      = controller.Find("Content").gameObject;
            FriendSearchObj = controller.Find("FriendSearch").gameObject;
            FriendNumLab    = controller.Find("Content/LeftSide/FriendNum").GetComponent <UILabel>();

            _titleListController = controller.Find("BGs/Middle/BGs/UpButtons/Title").GetMonoILRComponent <TitleListController>();
            _searchContent       = FriendSearchObj.GetMonoILRComponent <ShowFriendSearchContent>();

            FriendBtn = controller.Find("BGs/Middle/BGs/UpButtons/Title/BtnList/FriendBtn").GetComponent <UIButton>();
            FriendBtn.onClick.Add(new EventDelegate(OnMyFriendTabClick));
            FriendBtn.onClick.Add(new EventDelegate(_searchContent.OnLeaveContent));
            FriendBtn.onClick.Add(new EventDelegate(() =>
            {
                _titleListController.OnTitleBtnClick(FriendBtn.transform.Find("Sprite").gameObject);
            }));

            BlackListBtn = controller.Find("BGs/Middle/BGs/UpButtons/Title/BtnList/BlackListBtn").GetComponent <UIButton>();
            BlackListBtn.onClick.Add(new EventDelegate(OnBlackListTabClick));
            BlackListBtn.onClick.Add(new EventDelegate(_searchContent.OnLeaveContent));
            BlackListBtn.onClick.Add(new EventDelegate(() =>
            {
                _titleListController.OnTitleBtnClick(BlackListBtn.transform.Find("Sprite").gameObject);
            }));

            RecentlyBtn = controller.Find("BGs/Middle/BGs/UpButtons/Title/BtnList/RecentlyBtn").GetComponent <UIButton>();
            RecentlyBtn.onClick.Add(new EventDelegate(OnRecentlyContactTabClick));
            RecentlyBtn.onClick.Add(new EventDelegate(_searchContent.OnLeaveContent));
            RecentlyBtn.onClick.Add(new EventDelegate(() =>
            {
                _titleListController.OnTitleBtnClick(RecentlyBtn.transform.Find("Sprite").gameObject);
            }));

            TeamBtn = controller.Find("BGs/Middle/BGs/UpButtons/Title/BtnList/TeamBtn").GetComponent <UIButton>();
            TeamBtn.onClick.Add(new EventDelegate(OnTeamTabClick));
            TeamBtn.onClick.Add(new EventDelegate(_searchContent.OnLeaveContent));
            TeamBtn.onClick.Add(new EventDelegate(() =>
            {
                _titleListController.OnTitleBtnClick(TeamBtn.transform.Find("Sprite").gameObject);
            }));

            SearchBtn = controller.Find("BGs/Middle/BGs/UpButtons/Title/BtnList/SearchBtn").GetComponent <UIButton>();
            SearchBtn.onClick.Add(new EventDelegate(OnSearchFriendClick));
            SearchBtn.onClick.Add(new EventDelegate(_searchContent.OnOpenContent));
            SearchBtn.onClick.Add(new EventDelegate(() =>
            {
                _titleListController.OnTitleBtnClick(SearchBtn.transform.Find("Sprite").gameObject);
            }));
        }
示例#2
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>();
        }
示例#3
0
        public override void Awake()
        {
            base.Awake();

            TabController  = controller.transform.Find("Content/LeftSide/CategoryTab").GetMonoILRComponent <FriendTabController>();
            ChatController = controller.transform.Find("Content/RightSide/ChatWindow").GetMonoILRComponent <FriendChatController>();
            DynamicScroll  = controller.transform.Find("Content/LeftSide/Content")
                             .GetMonoILRComponent <FriendItemDynamicScrollManager>();
            titleCon = controller.transform.Find("BGs/Middle/BGs/UpButtons/Title").GetMonoILRComponent <TitleListController>();

            UIButton backButton = controller.transform.Find("BGs/CancelBtn").GetComponent <UIButton>();

            backButton.onClick.Add(new EventDelegate(base.OnCancelButtonClick));

            controller.UiButtons["HotfixBtn1"].onClick.Add(new EventDelegate(AllSendClick));
            controller.UiButtons["HotfixBtn2"].onClick.Add(new EventDelegate(AllGetClick));
            //FriendItem
            controller.transform.GetComponent <ConsecutiveClickCoolTrigger>("Content/RightSide/TopLayout/TargetHead/Icon").clickEvent.Add
                (new EventDelegate(OnHeadBtnClick));
            controller.UiButtons["HotfixBtn4"].onClick.Add(new EventDelegate(OnPkBtnClick));
            controller.UiButtons["HotfixBtn5"].onClick.Add(new EventDelegate(OnDeleteBtnClick));
            //ChatItem
            controller.UiButtons["HotfixBtn6"].onClick.Add(new EventDelegate(OnRemoveBlacklistClick));
        }