From bb463ef0b13236738a1da9cd04f57def3e7e2c7c Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 29 八月 2025 15:21:51 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/Main/MainWin.cs |   52 ++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs
index 97b6c00..ba3322f 100644
--- a/Main/System/Main/MainWin.cs
+++ b/Main/System/Main/MainWin.cs
@@ -8,7 +8,8 @@
 /// </summary>
 public class MainWin : FunctionsBaseWin
 {
-        //澶村儚鍖�
+    //澶村儚鍖�
+    [SerializeField] GameObject topBar;
     [SerializeField] AvatarCell avatarCell;
     [SerializeField] Text playerNameText;
     [SerializeField] Text powerText;
@@ -46,6 +47,33 @@
     }
 
 
+    protected override void SelectBottomTab(int index)
+    {
+        if (index == 3)
+        {
+            //鎸戞垬鐗规畩鏄剧ず閫昏緫
+            return;
+        }
+
+        topBar.SetActive(index == 0 || index == 2);
+        // 濡傛灉鐐瑰嚮褰撳墠宸查�変腑鐨勬爣绛撅紝涓嶅仛澶勭悊
+        if (functionOrder == index && currentSubUI != null)
+        {
+            return;
+        }
+
+        // 鏇存柊褰撳墠閫変腑鐨勬爣绛剧储寮�
+        functionOrder = index;
+
+        // 鍏抽棴褰撳墠鎵撳紑鐨勫瓙鐣岄潰
+        CloseCurrentSubUI();
+
+        // 鏍规嵁閫変腑鐨勬爣绛炬墦寮�瀵瑰簲鐨勭晫闈�
+        OpenSubUIByTabIndex();
+    }
+
+
+
     /// <summary>
     /// 鏇存柊鐜╁淇℃伅
     /// </summary>
@@ -57,7 +85,7 @@
                                                         PlayerDatas.Instance.baseData.facePic));
 
         playerNameText.text = PlayerDatas.Instance.baseData.PlayerName;
-        powerText.text = UIHelper.ReplaceLargeArtNum(PlayerDatas.Instance.baseData.FightPoint);
+        powerText.text = UIHelper.ReplaceLargeArtNum(PlayerDatas.Instance.baseData.FightPower);
 
         officialRankText.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID);
     }
@@ -67,7 +95,7 @@
         switch (type)
         {
             case PlayerDataType.FightPower:
-                powerText.text = UIHelper.ReplaceLargeArtNum(PlayerDatas.Instance.baseData.FightPoint);
+                powerText.text = UIHelper.ReplaceLargeArtNum(PlayerDatas.Instance.baseData.FightPower);
                 break;
             case PlayerDataType.RealmLevel:
                 officialRankText.InitUI(PlayerDatas.Instance.baseData.realmLevel, PlayerDatas.Instance.baseData.TitleID);
@@ -104,7 +132,12 @@
         {
             if (currentSubUI != null && currentSubUI.name == "HomeWin")
             {
+                Debug.Log("鐐瑰嚮涓荤晫闈㈡寜閽�");
                 //鎵撳紑涓荤晫闈㈢殑鎯呭喌涓嬪啀鐐瑰嚮鎸夐挳锛屾墽琛屾敾鍑婚�昏緫
+                if (AutoFightModel.Instance.isAutoAttackSet)
+                {
+                    AutoFightModel.Instance.isAutoAttack = true;
+                }
                 StoryBattleField storyBattleField = BattleManager.Instance.storyBattleField;
                 if (storyBattleField != null)
                 {
@@ -143,20 +176,19 @@
                 Debug.Log("鎵撳紑涓诲煄鐣岄潰");
                 break;
             case 1:
-                currentSubUI = UIManager.Instance.OpenWindow<RolePackWin>();
+                currentSubUI = UIManager.Instance.OpenWindow<AffairBaseWin>();
                 Debug.Log("鎵撳紑鍐呮斂鐣岄潰");
                 break;
             case 2:
                 currentSubUI = UIManager.Instance.OpenWindow<HeroBaseWin>(0);
                 Debug.Log("鎵撳紑姝﹀皢鐣岄潰");
                 break;
-            case 3:
-                // currentSubUI = UIManager.Instance.OpenUI<QuestUI>();
-                Debug.Log("鎵撳紑鎸戞垬鐣岄潰");
-                break;
+            // case 3:
+            //     // currentSubUI = UIManager.Instance.OpenUI<QuestUI>();
+            //     Debug.Log("鎵撳紑鎸戞垬鐣岄潰");
+            //     break;
             case 4:
-                //currentSubUI = UIManager.Instance.OpenWindow<PlaceWin>();
-                Debug.Log("鎵撳紑鍏細鐣岄潰");
+                currentSubUI = UIManager.Instance.OpenWindow<GuildBaseWin>();
                 break;
             default:
                 Debug.LogWarning("鏈煡鐨勬爣绛剧储寮�: " + functionOrder);

--
Gitblit v1.8.0