zhaoyang 3 жил өмнө
parent
commit
de293439de

+ 13 - 0
GameClient/Assets/Game/HotUpdate/DressUp/SceneController.cs

@@ -192,6 +192,19 @@ namespace GFGGame
 
             parentGameObj.transform.SetParent(sceneObj.transform.Find("Scene"), false);
             DressUpUtil.AddItem(itemId, sceneObj, false, false, parentGameObj, resLayer);
+
+            if (parentGameObj.transform.childCount > 1)
+            {
+                if (resLayer == itemCfg.resLayer1)
+                {
+                    GameObject.DestroyImmediate(parentGameObj.transform.GetChild(1).gameObject);
+                }
+                else if (resLayer == itemCfg.resLayer2)
+                {
+                    GameObject.DestroyImmediate(parentGameObj.transform.GetChild(0).gameObject);
+                }
+            }
+
             SceneController.SetBoxCollider2DToGameObject(parentGameObj.transform.GetChild(0).gameObject);
         }
 

+ 0 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -243,9 +243,6 @@ namespace GFGGame
                 }
             }
 
-            // GameObject parentGameObj2;
-
-
         }
         /************************************************************场景*********************************************************/