From ff032a0d727eee13399e29391e1437bea912337c Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 06 十二月 2025 16:42:46 +0800
Subject: [PATCH] 121 【武将】武将系统 - 生效武将版本,同步属性计算,更改新筛选模式

---
 Main/System/HeroUI/HeroCardLineCell.cs |   39 +++++++++++++++++++++++++++++++--------
 1 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/Main/System/HeroUI/HeroCardLineCell.cs b/Main/System/HeroUI/HeroCardLineCell.cs
index 449b020..110da08 100644
--- a/Main/System/HeroUI/HeroCardLineCell.cs
+++ b/Main/System/HeroUI/HeroCardLineCell.cs
@@ -4,18 +4,41 @@
 {
     [SerializeField] HeroCardCell[] cardList;
 
-    public void Display(int index)
-    { 
-        for (int i = 0; i < cardList.Length; i++)
+    //鐢熸晥鍜屾湭鐢熸晥鍏辩敤 heroSortList锛宎ctiveCount 鐢熸晥鏁伴噺, index澶т簬10000 鏈敓鏁�
+    public void Display(int index, int activeCount)
+    {
+        if (index < 10000)
         {
-            if (i + index < HeroUIManager.Instance.heroSortList.Count)
+            //鐢熸晥
+            for (int i = 0; i < cardList.Length; i++)
             {
-                cardList[i].SetActive(true);
-                cardList[i].Display(index + i);
+                if (i + index < activeCount)
+                {
+                    cardList[i].SetActive(true);
+                    cardList[i].Display(index + i);
+                }
+                else
+                {
+                    cardList[i].SetActive(false);
+                }
             }
-            else
+        }
+        else
+        {
+            //鏈敓鏁�
+            index = index - 10000;
+
+            for (int i = 0; i < cardList.Length; i++)
             {
-                cardList[i].SetActive(false);
+                if (i + index < HeroUIManager.Instance.heroSortList.Count)
+                {
+                    cardList[i].SetActive(true);
+                    cardList[i].Display(index + i);
+                }
+                else
+                {
+                    cardList[i].SetActive(false);
+                }
             }
         }
     }

--
Gitblit v1.8.0