Pārlūkot izejas kodu

fix:修改地图圣兵不显示问题

chenbin 2 dienas atpakaļ
vecāks
revīzija
4224ce0efb

+ 3 - 0
Assets/Scripts/Business/Domain/Framework/FGUI/FguiModule.cs

@@ -109,6 +109,9 @@ namespace XGame.Framework.FGUI
                         Log.Error($"UI加载结果为空. UIKey:{uikey}");
                         return;
                     }
+#if UNITY_EDITOR
+                    panelObj.displayObject.gameObject.name = uikey.PackageName + uikey.PanelName;
+#endif
                     var panel = new FguiPanel(panelObj, GetLayer(uikey.UIViewType));
                     var view = Activator.CreateInstance(uikey.UIViewType) as IUIView;
                     var context = _context.Clone();

+ 9 - 1
Assets/Scripts/Business/Runtime/Data/Partners/PartnersData.cs

@@ -59,7 +59,15 @@ namespace FL.Data
         /// 没有上阵为-1
         /// </summary>
         public Dictionary<int, int> UpSbPosMap { get; private set; } = new();
+        /// <summary>
+        /// key:uid
+        /// value:位置
+        /// </summary>
         public Dictionary<long, int> UpSbUIDPosMap { get; private set; } = new();
+        /// <summary>
+        /// key:位置
+        /// value:uid
+        /// </summary>
         public Dictionary<int, int> UpSbMap { get; private set; } = new();
 
         public void ClearSbUpMap()
@@ -118,7 +126,7 @@ namespace FL.Data
         /// <param name="uid">圣兵uid</param>
         public int GetPartnerUpPosByUID(long uid)
         {
-            return UpPartnerUIDMap.GetValueOrDefault(uid, -1);
+            return UpSbUIDPosMap.GetValueOrDefault(uid, -1);
         }
 
         /// <summary>

+ 1 - 1
Assets/Scripts/Business/Runtime/Nodes/GameMain/MapComponent.cs

@@ -242,7 +242,7 @@ namespace FL.Nodes.GameMain
         }
         private PartnerEntity[] GenPartners(Vector3 targetPosition)
         {
-            var goneUpMap = PartnersData.Instance.UpPartnerUIDMap;
+            var goneUpMap = PartnersData.Instance.UpSbUIDPosMap;
             var count = goneUpMap.Count;
             var partners = new PartnerEntity[count];
             var index = 0;