From e18e6f74e211bfb65747cac364f942b41620645c Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 14 十一月 2025 18:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/Component/UI/Core/GradientText.cs     |   31 ++++-----------
 Main/System/MainLevel/MainBossEnterWin.cs  |    8 ++++
 Main/System/Main/MainWin.cs                |   12 ++++++
 Main/System/Equip/EquipExchangeCell.cs     |   26 ++++++------
 Main/System/NewBieGuidance/NewBieCenter.cs |   27 ++++++-------
 5 files changed, 54 insertions(+), 50 deletions(-)

diff --git a/Main/Component/UI/Core/GradientText.cs b/Main/Component/UI/Core/GradientText.cs
index fa91a58..72fa832 100644
--- a/Main/Component/UI/Core/GradientText.cs
+++ b/Main/Component/UI/Core/GradientText.cs
@@ -31,7 +31,6 @@
         Horizontal,     // 姘村钩娓愬彉
         Vertical,       // 鍨傜洿娓愬彉
         Diagonal,       // 瀵硅绾挎笎鍙�
-        Radial,         // 寰勫悜娓愬彉
         Custom          // 鑷畾涔夊洓瑙掗鑹�
     }
 
@@ -154,19 +153,7 @@
         SetVerticesDirty();
     }
 
-    /// <summary>
-    /// 璁剧疆寰勫悜娓愬彉棰滆壊
-    /// </summary>
-    public void SetRadialGradient(Color centerColor, Color edgeColor)
-    {
-        m_GradientType = GradientType.Radial;
-        m_TopLeftColor = edgeColor;
-        m_TopRightColor = edgeColor;
-        m_BottomLeftColor = edgeColor;
-        m_BottomRightColor = edgeColor;
-        // 寰勫悜娓愬彉闇�瑕佸湪椤剁偣鐫�鑹插櫒涓鐞�
-        SetVerticesDirty();
-    }
+
 
     protected override void OnPopulateMesh(VertexHelper vh)
     {
@@ -221,21 +208,21 @@
                 return Color.Lerp(m_TopLeftColor, m_TopRightColor, x);
                 
             case GradientType.Vertical:
-                return Color.Lerp(m_TopLeftColor, m_BottomLeftColor, y);
+                return Color.Lerp(m_TopLeftColor, m_BottomLeftColor, 1 - y);
                 
             case GradientType.Diagonal:
-                return Color.Lerp(m_TopLeftColor, m_BottomRightColor, (x + y) * 0.5f);
+                // 瀵硅绾挎笎鍙橈細浠庡乏涓婂埌鍙充笅
+                // 浣跨敤鏇村噯纭殑瀵硅绾胯绠楋紝纭繚浠庡乏涓婂埌鍙充笅鐨勬笎鍙�
+                var diagonalFactor = Mathf.Clamp01((x + (1 - y)) * 0.5f);
+                return Color.Lerp(m_TopLeftColor, m_BottomRightColor, diagonalFactor);
                 
-            case GradientType.Radial:
-                var center = new Vector2(0.5f, 0.5f);
-                var distance = Vector2.Distance(new Vector2(x, y), center);
-                return Color.Lerp(m_TopLeftColor, m_BottomRightColor, distance * 2f);
+
                 
             case GradientType.Custom:
-                // 鍙岀嚎鎬ф彃鍊�
+                // 鍙岀嚎鎬ф彃鍊硷細淇Y杞存柟鍚�
                 var topColor = Color.Lerp(m_TopLeftColor, m_TopRightColor, x);
                 var bottomColor = Color.Lerp(m_BottomLeftColor, m_BottomRightColor, x);
-                return Color.Lerp(topColor, bottomColor, y);
+                return Color.Lerp(topColor, bottomColor, 1 - y);
                 
             default:
                 return color;
diff --git a/Main/System/Equip/EquipExchangeCell.cs b/Main/System/Equip/EquipExchangeCell.cs
index b9e8356..e75f77e 100644
--- a/Main/System/Equip/EquipExchangeCell.cs
+++ b/Main/System/Equip/EquipExchangeCell.cs
@@ -171,20 +171,20 @@
     //寤惰繜澶勭悊鐗规晥澶у皬
     async UniTask RefreshEffect(ItemModel equip)
     { 
-        // await UniTask.DelayFrame(3);
-        // if (effectID == 0)
-        // {
-        //     uieffect.Stop();
-        // }
-        // else
-        // {
-        //     uieffect.Stop();
-        //     uieffect.effectId = effectID;
-        //     //璁$畻楂樺害缂╂斁姣斾緥 鐗规晥鏄剧ず渚濊禆rect鐨勬帓鐗�
-        //     uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1);
-        //     uieffect.Play();
-        // }
+        await UniTask.DelayFrame(1);
         int effectID = EquipModel.Instance.equipUIEffects[Math.Min(equip.config.ItemColor, EquipModel.Instance.equipUIEffects.Length) - 1];
+        if (effectID == 0)
+        {
+            uieffect.Stop();
+        }
+        else
+        {
+            uieffect.Stop();
+            uieffect.effectId = effectID;
+            //璁$畻楂樺害缂╂斁姣斾緥 鐗规晥鏄剧ず渚濊禆rect鐨勬帓鐗�
+            uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1);
+            uieffect.Play();
+        }
 
         //浜屾澶勭悊鏀惧ぇ鏁堟灉
         await UniTask.Delay(100);
diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs
index 5e187a7..25c339a 100644
--- a/Main/System/Main/MainWin.cs
+++ b/Main/System/Main/MainWin.cs
@@ -28,6 +28,7 @@
     [SerializeField] UIEffectPlayer openCloseAnim;
     [SerializeField] FillTween cdTween;
     [SerializeField] Text hammerText;
+    [SerializeField] Text multiFightText;
 
     bool isForcePlayFightUIAnim = true; //寮哄埗鎾斁鎴樻枟閿ゅ瓙妗嗗姩鐢�
 
@@ -54,6 +55,7 @@
         PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
         AutoFightModel.Instance.OnFightEvent += OnSkillCast;
         RenameManager.Instance.OnUpdateRenameResultEvent += OnUpdateRenameResultEvent;
+        UIManager.Instance.OnCloseWindow += OnCloseWindow;
         base.OnPreOpen();
 
         // 鍒锋柊UI
@@ -65,6 +67,7 @@
         PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh;
         AutoFightModel.Instance.OnFightEvent -= OnSkillCast;
         RenameManager.Instance.OnUpdateRenameResultEvent -= OnUpdateRenameResultEvent;
+        UIManager.Instance.OnCloseWindow -= OnCloseWindow;
         base.OnPreClose();
         isForcePlayFightUIAnim = true;
     }
@@ -79,6 +82,13 @@
         topBar.SetActive(functionOrder == 0 || functionOrder == 2);
     }
 
+    void OnCloseWindow(UIBase _ui)
+    {
+        if (_ui.name == "AutoFightWin")
+        {
+            multiFightText.text = Language.Get("MultiFight", AutoFightModel.Instance.fightCost);
+        }
+    }
 
     //鎴樻枟鎸夐挳鍔ㄧ敾
     void ClickAnimation(int index)
@@ -293,6 +303,7 @@
             fightOtherWinBG.SetActive(false);
             fightOtherWinWarnImg.SetActive(false);
             fightBG.SetActive(true);
+            multiFightText.text = Language.Get("MultiFight", AutoFightModel.Instance.fightCost);
 
 
             if (BattleManager.Instance.storyBattleField != null &&
@@ -313,6 +324,7 @@
         {
             //闈炰富鍩庣晫闈�
             fightOtherWinBG.SetActive(true);
+            multiFightText.text = "";
             fightBG.SetActive(false);
             if (BattleManager.Instance.storyBattleField != null &&
             BattleManager.Instance.storyBattleField.GetBattleMode() == BattleMode.Stop)
diff --git a/Main/System/MainLevel/MainBossEnterWin.cs b/Main/System/MainLevel/MainBossEnterWin.cs
index 8d0ad2a..c86b5d5 100644
--- a/Main/System/MainLevel/MainBossEnterWin.cs
+++ b/Main/System/MainLevel/MainBossEnterWin.cs
@@ -24,6 +24,7 @@
     [SerializeField] Button fightBtn;
     [SerializeField] Image fightIcon;
     [SerializeField] ScrollerController dropItemScroller;
+    [SerializeField] Button heroRoadBtn;
 
 
     protected override void InitComponent()
@@ -39,6 +40,11 @@
         });
 
         fightBtn.AddListener(FightBoss);
+
+        heroRoadBtn.AddListener(() =>
+        {
+            UIManager.Instance.OpenWindow<DayMissionBaseWin>(2);
+        });
     }
 
     protected override void OnPreOpen()
@@ -129,6 +135,8 @@
             }
         }
         bossBG.SetOrgSprite(chapterConfig.BG, "MainLevel");
+
+        heroRoadBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayMission));
     }
 
 
diff --git a/Main/System/NewBieGuidance/NewBieCenter.cs b/Main/System/NewBieGuidance/NewBieCenter.cs
index b81dc25..ff8b1dc 100644
--- a/Main/System/NewBieGuidance/NewBieCenter.cs
+++ b/Main/System/NewBieGuidance/NewBieCenter.cs
@@ -31,8 +31,8 @@
     List<int> allGuides = new List<int>();
     public List<int> completeGuidesBuf = new List<int>();
 
-    //鍥犲叾浠栧師鍥犲鑷寸殑绛夊緟鏄剧ず鐨勫紩瀵肩獥鍙o紝鍦∣penWindow鏃朵細瑙﹀彂澶嶆煡锛屼絾鏃舵満澶櫄澧炲姞鍏抽棴鐣岄潰鏃惰Е鍙�
-    List<string> waitGuideWinNames = new List<string>();    
+    //鍥犲叾浠栧師鍥犲鑷寸殑绛夊緟鏄剧ず鐨勫紩瀵肩獥鍙o紝鍏抽棴鐣岄潰鏃惰Е鍙戞鏌ワ紝浣嗕竴鑸湪OpenWindow灏变細琚彁鍓嶅鐞�
+    List<int> waitGuideIDs = new List<int>();    
 
     bool inited = false;
 
@@ -84,20 +84,14 @@
     //鍏抽棴鍏朵粬鐣岄潰鏃跺鏌ユ湁娌¢渶瑕佺瓑寰呯殑寮曞
     void OnCloseWindow(UIBase _ui)
     {
-        foreach (var winName in waitGuideWinNames)
+        if (TryStartNewBieGuides(waitGuideIDs))
         {
-            var guides = GuideConfig.GetGuideListByWinName(winName);
-            if (guides != null)
-            {
-                if (TryStartNewBieGuides(guides))
-                {
-                    break;
-                }
-            }
+            Debug.Log("鎵ц绛夊緟涓殑寮曞" + JsonMapper.ToJson(waitGuideIDs));
         }
 
         if (_ui.name == "StoryBossBattleWin")
         {
+            //鍏抽棴鐣岄潰鎵嶄細瑙﹀彂鐨勫紩瀵硷紝濡備富绾縝oss鎵撳畬锛岀壒娈婂紩瀵�
             var guides = GuideConfig.GetGuideListByType((int)GuideTriggerType.PassMainBoss);
             if (guides != null)
             {
@@ -250,10 +244,11 @@
             (config.PauseMainBattle == 1 && PackManager.Instance.GetItems(PackType.DropItem).Count > 0
             && config.WinName != "EquipExchangeWin"))
         {
+            Debug.Log("寮曞琚腑鏂�,鍔犲叆绛夊緟闃熷垪 " + config.ID);
             //濡傛灉瀛愮晫闈㈡槸蹇呴』鎸傚湪璇ョ晫闈笂鍒囦笖娌℃湁钂欑増鐩栦綇鐨勫彲浠ュ鍔犲垽鏂�
-            if (!waitGuideWinNames.Contains(config.WinName))
+            if (!waitGuideIDs.Contains(config.ID))
             {
-                waitGuideWinNames.Add(config.WinName);
+                waitGuideIDs.Add(config.ID);
             }
             return true;
         }
@@ -283,12 +278,14 @@
         {
             return false;
         }
-        if (waitGuideWinNames.Contains(config.WinName))
+        if (waitGuideIDs.Contains(config.ID))
         {
-            waitGuideWinNames.Remove(config.WinName);
+            waitGuideIDs.Remove(config.ID);
         }
         currentGuide = _id;
 
+        Debug.Log($"寮�濮嬪紩瀵糏D锛歿_id}");
+
         guideStep = config.Steps.Length > 0 ? config.Steps[0] : 0;
         var stepConfig = ScriptableObjectLoader.LoadSoNewBieGuideStep(guideStep);
         TryPauseStoryBattle();

--
Gitblit v1.8.0