/// <summary> /// 刷新引导显示按钮列表 /// </summary> private void DeltGuideInfoList() { int[] TaskArray = AdGuideShowTaskQueue.ToArray(); for (int i = 0; i < InfoWindowList.Count; i++) { GuideInfoWidnow infoWd = InfoWindowList[i]; if (i >= AdGuideShowTaskQueue.Count) { infoWd.InfoWindowGameObject.SetActive(false); } else { infoWd.mGuideInfo = ConfigReader.AdvancedGuideInfoDict[TaskArray[i]]; infoWd.ShowGuideInfo(); } } }
//窗口控件初始化 protected override void InitWidget() { Transform mAnchor = mRoot.Find("Anchor"); for (int mcd = 0; mcd < mAnchor.childCount; mcd++) { GuideInfoWidnow infoWd = new GuideInfoWidnow(this); infoWd.InfoWindowGameObject = mAnchor.GetChild(mcd).gameObject; InfoWindowList.Add(infoWd); infoWd.InfoWindowGameObject.SetActive(false); Transform bg = infoWd.InfoWindowGameObject.transform.Find("BG"); infoWd.DynamicLabel = infoWd.InfoWindowGameObject.transform.Find("BG/DynamicLabel").GetComponent <UILabel>(); UIEventListener.Get(bg.gameObject).onClick += infoWd.GuideInfoOnClick; } GuideInfoWindow = mRoot.Find("UIGuideWindow").gameObject; mSmallTitle = GuideInfoWindow.transform.Find("TopText").GetComponent <UILabel>(); mInfoContent = GuideInfoWindow.transform.Find("BottomText").GetComponent <UILabel>(); mBtnContinue = GuideInfoWindow.transform.Find("Button").GetComponent <UIButton>(); mCenterPic = GuideInfoWindow.transform.Find("CenterPic").GetComponent <UISprite>(); EventDelegate.Add(mBtnContinue.onClick, OnButtonContinueOnClick); GuideInfoWindow.SetActive(false); InitAdGuideTask(); }