/// <summary> /// 新手引导事件触发 /// </summary> /// <param name="gobj"></param> private void OnUiGuideBtnFinishEvent(int taskId, bool presses) { if (GuideEventButton == null) { return; } GuideEventButton.transform.parent = LocalParent.transform; GuideEventButton.SetActive(false); GuideEventButton.SetActive(true); //TaskIdList.Remove(taskId); //if (TaskIdList.Count <= 0) //{ // return; //} //mCurrentTaskId = TaskIdList[0]; //DeltGuideInfos(mCurrentTaskId); }
/// <summary> /// 初始化有强制的UI引导 /// </summary> private void InitGuideGroundBtn(int taskId) { GuideTaskInfo info = ConfigReader.GuideTaskXmlInfoDict[taskId]; string name = info.BtnName; GuideEventButton = UIGuideModel.Instance.GetUiGuideButtonGameObject(name); if (GuideEventButton == null) { return; } LocalParent = GuideEventButton.transform.parent.gameObject; GuideEventButton.transform.parent = mRoot.transform; GuideEventButton.SetActive(false); GuideEventButton.SetActive(true); GameObject obj = LoadUiResource.LoadRes(mRoot, "Guide/" + info.PrefabName); obj.transform.Find("Label").GetComponent <UILabel>().text = info.Text; obj.transform.localPosition = info.PosXYZ; ButtonOnPress ck = GuideEventButton.AddComponent <ButtonOnPress>(); ck.AddListener(taskId, OnUiGuideBtnFinishEvent, ButtonOnPress.EventType.ClickType); }