public static void GotoNextLevel() { Level.LevelInfo nextLevelInfo = CurrentLevel.Info; if (LevelManager.GetNextLevel(ref _instance._currentLevelPack, ref nextLevelInfo)) { var nextLevel = LevelManager.GetLevel(CurrentLevelPack, nextLevelInfo.ID); GotoLevel(nextLevel); return; } GotoState(GameState.MainMenu); }
/// <summary> /// 탑메뉴 셋팅. UIBasePanel의 Awake 에서 호출 /// TopMenuType이 None이 아니어야지만 호출한다. /// </summary> public void ShowTopMenu(UIBasePanel curPanel) { CurPanel = curPanel; isFame = false; bool isEnergy = false; uint titleId = 0; if (CurPanel is TowerPanel) { titleId = 194; } else if (CurPanel is PartnerPanel) { titleId = 7; } else if (CurPanel is ShopPanel) { titleId = 462; } else if (CurPanel is ArenaPanel) { isFame = true; titleId = 823; } else if (CurPanel is FreefightPanel) { isFame = true; titleId = 12; } else if (CurPanel is ColosseumPanel) { titleId = 720; } else if (CurPanel is GuildJoinPanel) { titleId = 215; } else if (CurPanel is GuildPanel) { titleId = 8; } else if (CurPanel is QuestPopup) { titleId = 244; } else if (CurPanel is GachaPanel) { titleId = 539; } else if (CurPanel is RankPanel) { titleId = 161; } else if (CurPanel is BenefitPanel) { titleId = 681; } else if (CurPanel is VipPopup) { titleId = 460; } else if (curPanel is DungeonPanel) { titleId = 10; isEnergy = true; } else if (curPanel is ReadyPopup) { titleId = 63; } //else if (curPanel is ActivityPanel) // titleId = 825; else if (curPanel is ChapterPanel) { titleId = 9; isEnergy = true; } else if (curPanel is CategoryPanel) { titleId = 1287; } else//이쪽으로 온다고 버그는 아니다. { Debug.LogWarning(string.Format("undefined TitleName {0}", CurPanel.name)); } if (0 < titleId) { SetTitleName(titleId); } Level.LevelInfo levelInfo = _LowDataMgr.instance.GetLowDataCharLevel(NetData.instance.UserLevel); if (levelInfo.EnergyMax < NetData.instance.GetAsset(AssetType.Energy))//무료 충전개수를 초과했는지. { RegenLbl.gameObject.SetActive(false); RegenTime = System.DateTime.Now; } else if (RegenTime <= System.DateTime.Now)//충전시간 체크 { RegenLbl.gameObject.SetActive(false); } RefreshCash(AssetType.None); MenuType[3].transform.parent.gameObject.SetActive(isEnergy); if (SceneManager.instance.IsClearTutorial(TutorialType.CATEGORY)) { CategoryGo.SetActive(!(curPanel is CategoryPanel)); } else { CategoryGo.SetActive(false); } TutoSupport.enabled = false; gameObject.SetActive(true); OpenEvent.SetEvent(true, () => { }); }
public static void GotoLevel(Level.LevelInfo levelInfo) { GotoLevel(LevelManager.GetLevel(_instance._currentLevelPack, levelInfo.ID)); }
/// <summary> 경험치 상승 </summary> IEnumerator ExpGaugeUpdate() { ulong getExp = Reward.SaveExp + Reward.GetExp; float runTime = 0, duration = 0.5f; float curExpValue = (float)Reward.SaveExp / (float)Reward.SaveMaxExp; float maxExpValue = (float)getExp / (float)Reward.SaveMaxExp; float saveExpValue = 0; if (!gameObject.activeSelf) { while (!gameObject.activeSelf) { yield return(null); } } yield return(new WaitForSeconds(0.2f));//0.2f동안 대기 했다가 시작 //SoundManager.instance.PlaySfxSound(eUISfx.GetExp, false);//경험치 증가 사운드 bool isNoticePanel = false; bool isLevelup = Reward.SaveLevel < NetData.instance.UserLevel ? true : false;///현재 레벨이 높다는 것은 레벨업을 햇다는 소리겠지??; runTime = 0; if (isLevelup)//레벨업 했을 경우//1 <= maxExpValue && { if (1 < maxExpValue) { saveExpValue = maxExpValue; } maxExpValue = 1; uint level = Reward.SaveLevel; while (true) { runTime += Time.deltaTime; float rate = runTime / duration; rate = Mathf.Clamp01(rate); float value = Mathf.Lerp(curExpValue, maxExpValue, rate); ExpGauge.value = value; if (1 <= value && 1f <= saveExpValue)//두번이상 렙업함. { runTime = 0; curExpValue = 0; Labels[(int)labelT.hLv].text = string.Format(_LowDataMgr.instance.GetStringCommon(453), ++level); Level.LevelInfo levelLowData = _LowDataMgr.instance.GetLowDataCharLevel(level - 1); getExp -= levelLowData.Exp;//누적 경험치 levelLowData = _LowDataMgr.instance.GetLowDataCharLevel(level); if (levelLowData == null) { break; } saveExpValue -= 1; if (saveExpValue < 1) { break; } } else if (rate == 1) { break; } yield return(null); } //남은 경험치 계산 uint realCurExp = 0, realMaxExp = 0; NetData.instance.GetUserInfo().GetCurrentAndMaxExp(ref realCurExp, ref realMaxExp); maxExpValue = (float)realCurExp / (float)realMaxExp; Labels[(int)labelT.hLv].text = string.Format(_LowDataMgr.instance.GetStringCommon(453), NetData.instance.UserLevel); SceneManager.instance.SetNoticePanel(NoticeType.LevelUp); SceneManager.instance.SetNoticePanel(NoticeType.PowerUp); List <Quest.MainTutorialInfo> tutoList = _LowDataMgr.instance.GetLowDataMainTutorialList(1); for (int i = 0; i < tutoList.Count; i++) { if (tutoList[i].OpenType == 0)//일반연출 무시 { continue; } if (NetData.instance.UserLevel != tutoList[i].OpenLevel) { continue; } isNoticePanel = true; SceneManager.instance.SetNoticePanel(NoticeType.Contents, tutoList[i].OpenType); break; } curExpValue = 0; runTime = 0; while (true) { runTime += Time.deltaTime; float rate = runTime / duration; rate = Mathf.Clamp01(rate); float value = Mathf.Lerp(curExpValue, maxExpValue, rate); ExpGauge.value = value; if (rate == 1) { break; } yield return(null); } } else//경험치 증가만 함. { while (true) { runTime += Time.deltaTime; float rate = runTime / duration; rate = Mathf.Clamp01(rate); float value = Mathf.Lerp(curExpValue, maxExpValue, rate); ExpGauge.value = value; if (rate == 1) { break; } yield return(null); } } if (!isNoticePanel) { IsIgnoreBtn = false; } yield return(null); }