Browse Source

特效层级

guodong 2 năm trước cách đây
mục cha
commit
20102abe45

+ 6 - 6
GameClient/Assets/Game/HotUpdate/Constant/ConstSortingOrder.cs

@@ -2,11 +2,11 @@ namespace GFGGame
 {
 {
     public class ConstSortingOrder
     public class ConstSortingOrder
     {
     {
-        public const int TOP = 99;
-        public const int Guide = 100;
-        public const int Modal = 101;
-        public const int Alert = 102;
-        public const int Debug = 103;
-        public const int Float = 104;
+        public const int TOP = 1099;
+        public const int Guide = 1100;
+        public const int Modal = 1101;
+        public const int Alert = 1102;
+        public const int Debug = 1103;
+        public const int Float = 1104;
     }
     }
 }
 }

+ 9 - 3
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -436,12 +436,18 @@ namespace GFGGame
             gameObj.transform.SetParent(parentObj.transform, false);
             gameObj.transform.SetParent(parentObj.transform, false);
             gameObj.name = objName;
             gameObj.name = objName;
             var sortingGroup = gameObj.transform.GetComponent<SortingGroup>();
             var sortingGroup = gameObj.transform.GetComponent<SortingGroup>();
-            if (sortingGroup == null)
+            if (sortingGroup != null)
             {
             {
-                sortingGroup = gameObj.AddComponent<SortingGroup>();
+                //sortingGroup = gameObj.AddComponent<SortingGroup>();
+                GameObject.Destroy(sortingGroup);
+            }
+            var meshRender = gameObj.GetComponent<MeshRenderer>();
+            if(meshRender != null)
+            {
+                meshRender.sortingOrder = sortingOrder + 1;
             }
             }
             sortingGroup.sortingOrder = sortingOrder + 1;//特效层默认高一个层级
             sortingGroup.sortingOrder = sortingOrder + 1;//特效层默认高一个层级
-            //SetParticleSortingOrder(gameObj, sortingOrder + 1);//特效层默认高一个层级
+            SetParticleSortingOrder(gameObj, sortingOrder + 1);//特效层默认高一个层级
         }
         }
 
 
         public static void LoadSpritePos(string res, out float tx, out float ty)
         public static void LoadSpritePos(string res, out float tx, out float ty)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -38,7 +38,7 @@ namespace GFGGame
             if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
             if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
             {
             {
                 Timers.inst.Remove(UpdateTime);
                 Timers.inst.Remove(UpdateTime);
-                Timers.inst.Add(1, 0, UpdateTime);
+                //Timers.inst.Add(1, 0, UpdateTime);
             }
             }
         }
         }