同步代码

This commit is contained in:
yangjing 2022-05-30 18:06:55 +08:00
parent 9102c8914c
commit 537387e0a6
1 changed files with 13 additions and 0 deletions

View File

@ -43,11 +43,24 @@ public class PanelBook : BasePanel
tCard = GameConfig.Instance.CardList[i]; tCard = GameConfig.Instance.CardList[i];
if (Utils.IsHuman(tCard.CardID)) if (Utils.IsHuman(tCard.CardID))
{ {
if (tHumanIndex >= GameConfig.Instance.BlockMaxLevel)
{
mHumanCells[tHumanIndex].gameObject.SetActive(false);
tHumanIndex++;
continue;
}
mHumanCells[tHumanIndex].InitCell(tCard.CardID, !PlayerData.Instance.HasCard(tCard.CardID)); mHumanCells[tHumanIndex].InitCell(tCard.CardID, !PlayerData.Instance.HasCard(tCard.CardID));
tHumanIndex++; tHumanIndex++;
} }
else if(Utils.IsMonster(tCard.CardID)) else if(Utils.IsMonster(tCard.CardID))
{ {
if (tMonsterIndex >= GameConfig.Instance.BlockMaxLevel)
{
mMonsterCells[tMonsterIndex].gameObject.SetActive(false);
tMonsterIndex++;
continue;
}
mMonsterCells[tMonsterIndex].InitCell(tCard.CardID, !PlayerData.Instance.HasCard(tCard.CardID)); mMonsterCells[tMonsterIndex].InitCell(tCard.CardID, !PlayerData.Instance.HasCard(tCard.CardID));
tMonsterIndex++; tMonsterIndex++;
} }