Explorar o código

抽卡移除特效

zhaoyang %!s(int64=3) %!d(string=hai) anos
pai
achega
844be9a2ef

+ 13 - 4
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxStarView.cs

@@ -36,12 +36,21 @@ namespace GFGGame
         private bool isFirst = true;
         public override void Dispose()
         {
-            for (int i = 0; i < _gameObjects.Count; i++)
+            // for (int i = 0; i < _gameObjects.Count; i++)
+            // {
+            //     SceneController.DestroyObjectFromView(_gameObjects[i]);
+            //     SceneController.DestroyObjectFromView(_gameObjects1[i]);
+            // }
+            ICollection keys0 = dicGameobj.Keys;
+            foreach (int key in keys0)
             {
-                SceneController.DestroyObjectFromView(_gameObjects[i]);
-                SceneController.DestroyObjectFromView(_gameObjects1[i]);
-            }
+                for (int i = 0; i < dicGameobj[key].Count; i++)
+                {
+                    SceneController.DestroyObjectFromView(dicGameobj[key][i]);
+                    SceneController.DestroyObjectFromView(dicGameobj1[key][i]);
+                }
 
+            }
             base.Dispose();
         }