diff --git a/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs b/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs index 2883a784..e2e8d66d 100644 --- a/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs +++ b/Assets/Scripts/UI/CustomControl/LevelList/LevelPage.cs @@ -11,8 +11,11 @@ public class LevelPage : PageView { get { - int tCount = GameConfig.Instance.LevelSort.Count + 1; - return tCount; + int tTotalCount = GameConfig.Instance.LevelSort.Count + 1;//add coming soon + int tUnlockedCount = PlayerData.Instance.UnlockedLevel; + int tEnoughCount = (tUnlockedCount / CountPerPage + 1) + (tUnlockedCount % CountPerPage == 0 ? -1 : 0); + + return Mathf.Min(tTotalCount, tEnoughCount * CountPerPage); } } @@ -27,7 +30,7 @@ public class LevelPage : PageView } else { - if (pIndex < Count - 1) + if (pIndex < GameConfig.Instance.LevelSort.Count) { tCell.SetEmpty(); }