From 537387e0a6a879917fcd85b37e4ab164174516fa Mon Sep 17 00:00:00 2001 From: yangjing Date: Mon, 30 May 2022 18:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UIs/PanelBook.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Assets/Scripts/UIs/PanelBook.cs b/Assets/Scripts/UIs/PanelBook.cs index dbe38004..bfa39c04 100644 --- a/Assets/Scripts/UIs/PanelBook.cs +++ b/Assets/Scripts/UIs/PanelBook.cs @@ -43,11 +43,24 @@ public class PanelBook : BasePanel tCard = GameConfig.Instance.CardList[i]; 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)); tHumanIndex++; } 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)); tMonsterIndex++; }