Ejemplo n.º 1
0
        /// <summary>
        /// 显示引导的信息
        /// </summary>
        /// <param name="mTaskId"></param>
        public void ShowGuideWindow(int mTaskId)
        {
            mShowGuideTaskId = mTaskId;
            AdvancedGuideInfo mInfo = ConfigReader.AdvancedGuideInfoDict[mShowGuideTaskId];

            GuideInfoWindow.SetActive(true);
            mSmallTitle.text  = mInfo.SmallTitle;
            mInfoContent.text = mInfo.Content;
            ResourceUnit Unit = ResourcesManager.Instance.loadImmediate("Guide/" + mInfo.PrefabID, ResourceType.PREFAB);

            mCenterPic.atlas      = (Unit.Asset as GameObject).GetComponent <UIAtlas>();
            mCenterPic.spriteName = mInfo.PicID;
        }
Ejemplo n.º 2
0
        private void OnButtonContinueOnClick()
        {
            int[]      TaskArray = AdGuideShowTaskQueue.ToArray();
            List <int> taskList  = new List <int>();

            foreach (int task in TaskArray)
            {
                int mtk = AdGuideShowTaskQueue.Dequeue();
                if (mtk != mShowGuideTaskId)
                {
                    taskList.Add(mtk);
                }
            }
            foreach (int mtask in taskList)
            {
                AdGuideShowTaskQueue.Enqueue(mtask);
            }
            GuideInfoWindow.SetActive(false);
            DeltGuideInfoList();
        }
Ejemplo n.º 3
0
        //窗口控件初始化
        protected override void InitWidget()
        {
            Transform mAnchor = mRoot.FindChild("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.FindChild("BG");
                infoWd.DynamicLabel = infoWd.InfoWindowGameObject.transform.FindChild("BG/DynamicLabel").GetComponent <UILabel>();
                UIEventListener.Get(bg.gameObject).onClick += infoWd.GuideInfoOnClick;
            }

            GuideInfoWindow = mRoot.FindChild("UIGuideWindow").gameObject;
            mSmallTitle     = GuideInfoWindow.transform.FindChild("TopText").GetComponent <UILabel>();
            mInfoContent    = GuideInfoWindow.transform.FindChild("BottomText").GetComponent <UILabel>();
            mBtnContinue    = GuideInfoWindow.transform.FindChild("Button").GetComponent <UIButton>();
            mCenterPic      = GuideInfoWindow.transform.FindChild("CenterPic").GetComponent <UISprite>();
            EventDelegate.Add(mBtnContinue.onClick, OnButtonContinueOnClick);
            GuideInfoWindow.SetActive(false);
            InitAdGuideTask();
        }