lzx hace 1 semana
padre
commit
4eaf7b3350

+ 1 - 1
Assets/Art/VFX/Materials/UIMat/ui_ob_yindao_glow_add.mat

@@ -57,7 +57,7 @@ Material:
         m_Offset: {x: 0, y: 0}
     m_Ints: []
     m_Floats:
-    - _Alpha: 0.017855883
+    - _Alpha: 0
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0

+ 2 - 2
Assets/Art/VFX/Materials/UIMat/ui_renwu_lg.mat

@@ -57,13 +57,13 @@ Material:
         m_Offset: {x: 0, y: 0}
     m_Ints: []
     m_Floats:
-    - _Alpha: 0.5004834
+    - _Alpha: 0.21572763
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0
     - _MainSpeedU: 0.5
     - _MainSpeedV: 0.5
-    - _MainTexOffsetU: -0.105480194
+    - _MainTexOffsetU: 0.19332218
     - _MainTexOffsetV: 0
     - _MainTilingU: 0.8
     - _MainTilingV: 1

+ 10 - 5
Assets/Res/UI/LevelChoosePanel/PlacesInfoPanel.prefab

@@ -840,10 +840,10 @@ RectTransform:
   m_Children: []
   m_Father: {fileID: 4925105276589191232}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 1, y: 1}
+  m_AnchorMin: {x: 0.5, y: 1}
+  m_AnchorMax: {x: 0.5, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_SizeDelta: {x: 560, y: 620.0857}
   m_Pivot: {x: 0.5, y: 1}
 --- !u!114 &3754465717368421511
 MonoBehaviour:
@@ -852,7 +852,7 @@ MonoBehaviour:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5454807471879841032}
-  m_Enabled: 1
+  m_Enabled: 0
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
   m_Name: 
@@ -866,7 +866,7 @@ MonoBehaviour:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5454807471879841032}
-  m_Enabled: 1
+  m_Enabled: 0
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
   m_Name: 
@@ -1853,6 +1853,11 @@ MonoBehaviour:
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
+  - key: sv
+    gameObject: {fileID: 1693484268893770808}
+    isAssetBundle: 0
+    isList: 0
+    ListCollectorDatas: []
   isAssetBundle: 0
 --- !u!1 &9099603387588443209
 GameObject:

+ 5 - 5
Assets/Res/UI/LevelChoosePanel/PlacesInfoWidget.prefab

@@ -40,11 +40,11 @@ RectTransform:
   - {fileID: 2492337691129898603}
   m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMin: {x: 0.5, y: 1}
+  m_AnchorMax: {x: 0.5, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 551, y: 131}
-  m_Pivot: {x: 0.5, y: 0.5}
+  m_Pivot: {x: 0.5, y: 1}
 --- !u!222 &3536159168277858297
 CanvasRenderer:
   m_ObjectHideFlags: 0
@@ -622,7 +622,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -214.9, y: 0.3791}
+  m_AnchoredPosition: {x: -214.9, y: 0.37908936}
   m_SizeDelta: {x: 132, y: 132}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &7105992142605206126
@@ -928,7 +928,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 4.0237, y: 0.7521}
+  m_AnchoredPosition: {x: 4.0237, y: 0.7520752}
   m_SizeDelta: {x: 182.9447, y: 51.353}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6482916863988794459

+ 1 - 1
Assets/Scripts/GameLogic/Combat/CombatState/CombatFightState.cs

@@ -54,7 +54,7 @@ namespace GameLogic.Combat.CombatState
             if (CombatController.currActiveCombat.isPrepare)
             {
                 bool isPrepareFinish = true;
-                for (int i = 0; i < allHero.Length; i++)
+                for (int i = 0; i < allHero?.Length; i++)
                 {
                     if (allHero[i].CombatAIBasic.stateControl.CurrStateName.Equals(CombatHeroStateType.Active))
                     {

+ 43 - 9
Assets/Scripts/GameUI/UI/LevelChoosePanel/PlacesInfoPanel.cs

@@ -54,16 +54,30 @@ namespace Fort23.Mono
             needSmallPlacesId = (int)(uiData[2]);
             isChange = false;
             placesConfig = ConfigComponent.Instance.Get<PlacesConfig>(PlacesId);
-
-
-            foreach (var placesConfigSmallPlacersId in placesConfig.SmallPlacersIds)
+            sv.vertical = true;
+            int maxY = 131 * placesConfig.SmallPlacersIds.Length + (placesConfig.SmallPlacersIds.Length) * 33;
+            Content.sizeDelta = new Vector2(551, maxY);
+            for (var i = 0; i < placesConfig.SmallPlacersIds.Length; i++)
             {
                 PlacesInfoWidget shopBtnWidget =
                     await UIManager.Instance.CreateGComponent<PlacesInfoWidget>(null, Content);
-                shopBtnWidget.CustomInit(placesConfigSmallPlacersId, callBack);
+                shopBtnWidget.CustomInit(placesConfig.SmallPlacersIds[i], callBack);
+                shopBtnWidget.transform.anchoredPosition = new Vector2(0, -131 * i - 33 * i);
                 if (needSmallPlacesId == shopBtnWidget.smallPlacesConfig.ID && shopBtnWidget.isUlock)
                 {
                     currentNeedPlacesInfoWidget = shopBtnWidget;
+                    int y = 131 * (i - 1) + 33 * (i - 1);
+                    if (y < 0)
+                    {
+                        y = 0;
+                    }
+                    else if (y >= maxY)
+                    {
+                        y = maxY;
+                    }
+
+                    Content.anchoredPosition = new Vector2(0, y);
+                    sv.vertical = false;
                 }
 
                 placesInfoWidgets.Add(shopBtnWidget);
@@ -86,16 +100,36 @@ namespace Fort23.Mono
         public async override CTask Show()
         {
             base.Show();
-            LayoutRebuilder.ForceRebuildLayoutImmediate(Content);
+            // LayoutRebuilder.ForceRebuildLayoutImmediate(Content);
+
+            GuideHand.gameObject.SetActive(currentNeedPlacesInfoWidget != null);
+        }
+
+        [CustomMethod(CustomMethodType.Update)]
+        public void Update()
+        {
             if (currentNeedPlacesInfoWidget != null)
             {
-                Vector3 localPos = transform.InverseTransformPoint(currentNeedPlacesInfoWidget.transform.position);
+                if (currentNeedPlacesInfoWidget.currentSmallPlacesData == null &&
+                    currentNeedPlacesInfoWidget.IsSmallPlacesDataUlock(currentNeedPlacesInfoWidget.smallPlacesConfig
+                        .ID))
+                {
+                    Vector3 localPos =
+                        transform.InverseTransformPoint(currentNeedPlacesInfoWidget.Btn_Jiesuo.transform.position);
 
 
-                GuideHand.transform.localPosition = localPos;
-            }
+                    GuideHand.transform.localPosition = localPos;
+                }
+                else
+                {
+                    Vector3 localPos =
+                        transform.InverseTransformPoint(
+                            currentNeedPlacesInfoWidget.Btn_Qianwang.transform.position);
 
-            GuideHand.gameObject.SetActive(currentNeedPlacesInfoWidget != null);
+
+                    GuideHand.transform.localPosition = localPos;
+                }
+            }
         }
 
         public static async CTask OpenPanel(int placesId, Action<bool> callBack, int needSmallPlacesId = 0)

+ 11 - 0
Assets/Scripts/GameUI/UI/LevelChoosePanel/PlacesInfoPanelData.cs

@@ -107,6 +107,17 @@ namespace Fort23.Mono
 	      return _GuideHand;
 	     }
 	   }
+	  private ScrollRect _sv;
+	  public ScrollRect sv
+	   {
+	   get{
+	      if (_sv == null)
+	       {
+	         _sv  = GetUIUnit<ScrollRect>("sv"); 
+	       }
+	      return _sv;
+	     }
+	   }
 	  #endregion 自定义数据结束 
 	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
 	{

+ 3 - 3
Assets/Scripts/GameUI/UI/LevelChoosePanel/PlacesInfoWidget.cs

@@ -9,8 +9,8 @@ namespace Fort23.Mono
     [UIBinding(prefab = "PlacesInfoWidget")]
     public partial class PlacesInfoWidget : UIComponent
     {
-        private AccountFileInfo.SmallPlacesData currentSmallPlacesData;
-        private AccountFileInfo.SmallPlacesData lastSmallPlacesData;
+        public AccountFileInfo.SmallPlacesData currentSmallPlacesData;
+        public AccountFileInfo.SmallPlacesData lastSmallPlacesData;
         public SmallPlacesConfig smallPlacesConfig;
         private Action<bool> callBack;
 
@@ -225,7 +225,7 @@ namespace Fort23.Mono
             return "";
         }
 
-        private bool IsSmallPlacesDataUlock(int id)
+        public bool IsSmallPlacesDataUlock(int id)
         {
             AccountFileInfo.SmallPlacesData lastSmallPlacesData =
                 PlayerManager.Instance.GetSmallPlacesData(id - 1);