关卡显示逻辑修改
This commit is contained in:
parent
28bebb61c5
commit
e4e12e0274
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue