public bool StartNextTutorial(TutorialType nextType) { UIBasePanel frontPanel = uiMgr.GetCurPanel(); if (frontPanel == null) { Hide(); return(false); } else { return(frontPanel.OnSubTutorial()); } //return false; }
public override void Init() { base.Init(); for (int i = 0; i < NoticeGo.Length; i++) { NoticeGo[i].SetActive(false); } NoticeDelay = new float[NoticeLbl.Length]; for (int i = 0; i < NoticeLbl.Length; i++) { NoticeDelay[i] = 1; NoticeLbl[i].color = new Color32(255, 255, 255, 0); NoticeLbl[i].text = ""; } UIHelper.CreateEffectInGame(NoticeGo[(int)NoticeType.Contents].transform.FindChild("Effect"), "Fx_UI_new_contents_01"); EventDelegate.Set(NoticeGo[(int)NoticeType.Achiev].GetComponent <UIEventTrigger>().onClick,//업적페널 오픈. delegate() { if (AchieveType <= 0 || !TownState.TownActive) { AchieveType = 0; AchieveSubType = 0; AchieveLv = 0; NoticeGo[(int)NoticeType.Achiev].SetActive(false); return; } NoticeGo[(int)NoticeType.Achiev].SetActive(false); //AchieveType = 0; AchieveSubType = 0; AchieveLv = 0; if (uiMgr.IsActiveTutorial) //튜토리얼중 무시한다. { return; } UIBasePanel check = uiMgr.GetCurPanel(); if (check == null) { check = UIMgr.instance.GetSecondUI(); } if (check == null) { return; } if (check.name.Contains("AchievePanel")) //업적 페널에 있는데 업적이 갱신되서 클릭함 무시한다. { return; } if (check.name.Contains("TownPanel")) { check.Hide(); } else { check.ObjectHide(); } if (AchieveTabType == 0) { UIMgr.OpenAchievePanel(check, 0); } else { UIMgr.OpenAchievePanel(check, 1, (int)AchieveType); } if (_TownState != null && _TownState.MyHero != null) { _TownState.MyHero.ResetMoveTarget(); } }); for (int i = 0; i < GetMailSlotTf.Length; i++) { UIHelper.CreateInvenSlot(GetMailSlotTf[i].FindChild("root")); } EventDelegate.Set(NoticeGo[(int)NoticeType.Contents].transform.FindChild("Icon").GetComponent <UIEventTrigger>().onClick, () => { NoticeGo[(int)NoticeType.Contents].SetActive(false); if (TownState.TownActive) { UIBasePanel basePanel = uiMgr.GetCurPanel(); //UIMgr.UIType.Default if (basePanel == null) { basePanel = uiMgr.GetFirstUI(); if (basePanel == null) { basePanel = UIMgr.GetTownBasePanel(); } } if (basePanel != null) { if (!basePanel.name.Contains("TownPanel")) { if (basePanel.ReturnType == PrevReturnType.Close) { basePanel.Close(); } else { basePanel.Hide(); } } else if (!basePanel.IsHidePanel) { basePanel.OnSubTutorial(); } } } else { UIBasePanel resultPanel = UIMgr.GetUIBasePanel("UIPanel/ResultRewardStarPanel"); if (resultPanel != null) { (resultPanel as ResultRewardStarPanel).GotoTown(); } } }); }