From 973edc44a04dceb8b48a32ca912e6167f86189d4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 25 八月 2025 17:38:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/Main/HomeWin.cs |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index 1ccc79c..f4e73cd 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -29,6 +29,10 @@
 
     [SerializeField] Button autoBtn;
 
+
+    //鍏朵粬鍔熻兘鍏ュ彛
+    [SerializeField] Button monthCardBtn;
+
     /// <summary>
     /// 鍒濆鍖栫粍浠�
     /// </summary>
@@ -46,7 +50,7 @@
             UIManager.Instance.OpenWindow<HeroPosWin>();
         });
 
-        autoBtn.AddListener(()=>
+        autoBtn.AddListener(() =>
         {
             //娴嬭瘯鎷惧彇鎵�鏈夌墿鍝�
             var items = PackManager.Instance.GetItems(PackType.DropItem);
@@ -64,9 +68,15 @@
             }
             if (dropindexs.Count > 0)
             {
-                EquipModel.Instance.NotifyItemDrop(dropindexs, BattleManager.Instance.storyBattleField.battleRootNode.blueTeamNodeList[Random.Range(0,5)].GetComponent<RectTransform>());
+                EquipModel.Instance.NotifyItemDrop(dropindexs, BattleManager.Instance.storyBattleField.battleRootNode.blueTeamNodeList[Random.Range(0, 5)].GetComponent<RectTransform>());
                 dropindexs.Clear();
             }
+        });
+
+
+        monthCardBtn.AddListener(() =>
+        {
+            InvestModel.Instance.BuyInvest(InvestModel.monthCardType);
         });
     }
 
@@ -77,6 +87,7 @@
     {
         UpdatePlayerInfo();
         UpdateTask();
+        RefreshRecharge();
     }
 
     protected override void OnPreOpen()
@@ -119,6 +130,11 @@
 
     }
 
+    void RefreshRecharge()
+    { 
+        monthCardBtn.SetActive(!InvestModel.Instance.IsInvested(InvestModel.monthCardType));
+    }
+
     /// <summary>
     /// 鏇存柊鐜╁淇℃伅
     /// </summary>

--
Gitblit v1.8.0