From 35db0429414030475e2c61ec2ea1e5a78aa169ac Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 30 九月 2025 18:26:03 +0800
Subject: [PATCH] 0312 优化淘金表现

---
 Main/System/InternalAffairs/GoldRushRefreshWin.cs |   10 +++++-----
 Main/System/InternalAffairs/GoldRushAutoBuyWin.cs |    1 +
 Main/System/InternalAffairs/GoldRushWorkCell.cs   |    4 ++--
 Main/System/InternalAffairs/GoldRushLeader.cs     |   11 +++++++++--
 Main/System/InternalAffairs/GoldRushManager.cs    |   13 +++++++++++--
 5 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs b/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs
index 7dba811..7adca76 100644
--- a/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs
+++ b/Main/System/InternalAffairs/GoldRushAutoBuyWin.cs
@@ -48,6 +48,7 @@
     void Buy()
     {
         RechargeManager.Instance.CTG(GoldRushManager.Instance.buyAutoCTGIDList[0]);
+        CloseWindow();
     }
 
 }
\ No newline at end of file
diff --git a/Main/System/InternalAffairs/GoldRushLeader.cs b/Main/System/InternalAffairs/GoldRushLeader.cs
index 59cfcba..1aff9c1 100644
--- a/Main/System/InternalAffairs/GoldRushLeader.cs
+++ b/Main/System/InternalAffairs/GoldRushLeader.cs
@@ -76,8 +76,15 @@
 
         Vector3 nextPos = leaderPathPointArr[moveIndex].transform.localPosition;
         if (isBack)
-        { 
-            leader.PlayAnimation("run_xiangzi", true, false);
+        {
+            if (GoldRushManager.Instance.HasWorking(tendID))
+            {
+                leader.PlayAnimation("run", true, false);
+            }
+            else
+            { 
+                leader.PlayAnimation("run_xiangzi", true, false);
+            }
         }
         else
         {
diff --git a/Main/System/InternalAffairs/GoldRushManager.cs b/Main/System/InternalAffairs/GoldRushManager.cs
index 19496ac..c84e110 100644
--- a/Main/System/InternalAffairs/GoldRushManager.cs
+++ b/Main/System/InternalAffairs/GoldRushManager.cs
@@ -386,11 +386,20 @@
     }
 
     //鏈夊彲杩涜鍜岃繘琛屼腑鐨�
-    public bool HasWorking()
+    public bool HasWork()
     {
         return campInfoDict.Values.Any(x => x.GoldID != 0);
     }
 
+    //杩涜涓殑
+    public bool HasWorking(int campID)
+    {
+        if (campInfoDict.ContainsKey(campID))
+        {
+            return campInfoDict[campID].GoldID != 0 && campInfoDict[campID].EndTime != 0;
+        }
+        return false;
+    }
 
     public string GetCampItemName(GoldRushItemConfig config)
     {
@@ -685,7 +694,7 @@
             return;
         }
 
-        if (UIHelper.GetMoneyCnt(52) <= 0 && !HasWorking())
+        if (UIHelper.GetMoneyCnt(52) <= 0 && !HasWork())
         {
             PauseAutoWorking();
             SysNotifyMgr.Instance.ShowTip("GoldRush10");
diff --git a/Main/System/InternalAffairs/GoldRushRefreshWin.cs b/Main/System/InternalAffairs/GoldRushRefreshWin.cs
index 3cd133c..86e6e22 100644
--- a/Main/System/InternalAffairs/GoldRushRefreshWin.cs
+++ b/Main/System/InternalAffairs/GoldRushRefreshWin.cs
@@ -75,7 +75,7 @@
         if (endTime == 0)
         {
             //鏈紑濮�
-            timeText.text = TimeUtility.SecondsToMS(config.NeedSeconds);
+            timeText.text = TimeUtility.SecondsToHMS(config.NeedSeconds);
             refreshRect.SetActive(true);
             callBackBtn.SetActive(false);
 
@@ -87,7 +87,7 @@
         }
         else
         {
-            timeText.text = TimeUtility.SecondsToMS(endTime - TimeUtility.AllSeconds);
+            timeText.text = TimeUtility.SecondsToHMS(endTime - TimeUtility.AllSeconds);
             refreshRect.SetActive(false);
             callBackBtn.SetActive(true);
             RefreshCallBackBtn();
@@ -121,7 +121,7 @@
         var endTime = GoldRushManager.Instance.GetCampEndTime(GoldRushManager.Instance.selectCampID);
         if (endTime != 0)
         {
-            timeText.text = TimeUtility.SecondsToMS(endTime - TimeUtility.AllSeconds);
+            timeText.text = TimeUtility.SecondsToHMS(endTime - TimeUtility.AllSeconds);
 
             var addStr = new string('.', (int)Time.time % 4);
             workingText.text = Language.Get("GoldRush37") + addStr;
@@ -153,11 +153,11 @@
         if (endTime == 0)
         {
             //鏈紑濮�
-            timeText.text = TimeUtility.SecondsToMS(config.NeedSeconds / Math.Max(1, count));
+            timeText.text = TimeUtility.SecondsToHMS(config.NeedSeconds / Math.Max(1, count));
         }
         else
         {
-            timeText.text = TimeUtility.SecondsToMS(endTime - TimeUtility.AllSeconds);
+            timeText.text = TimeUtility.SecondsToHMS(endTime - TimeUtility.AllSeconds);
             RefreshCallBackBtn();
         }
     }
diff --git a/Main/System/InternalAffairs/GoldRushWorkCell.cs b/Main/System/InternalAffairs/GoldRushWorkCell.cs
index d3f16ed..7a5667f 100644
--- a/Main/System/InternalAffairs/GoldRushWorkCell.cs
+++ b/Main/System/InternalAffairs/GoldRushWorkCell.cs
@@ -62,7 +62,7 @@
         {
             if (endTime != 0)
             {
-                timeText.text = TimeUtility.SecondsToMS(endTime - TimeUtility.AllSeconds);
+                timeText.text = TimeUtility.SecondsToHMS(endTime - TimeUtility.AllSeconds);
                 //鎸夊師鎬绘椂闀垮綋杩涘害鏉�
                 slider.value = (config.NeedSeconds - (endTime - TimeUtility.AllSeconds)) / (float)config.NeedSeconds;
             }
@@ -77,7 +77,7 @@
                 {
                     heroModels[i].SetActive(true);
                     var skinID = GoldRushManager.Instance.GetWorkerSkinID(campID, i);
-                    heroModels[i].Create(skinID, 0.5f);
+                    heroModels[i].Create(skinID, 0.6f, motionName:"run");
                 }
                 else
                 {

--
Gitblit v1.8.0