WGL 1 місяць тому
батько
коміт
5938f61b9c
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      ActionTowerDefense/Assets/Scripts/UI/ShopUI.cs

+ 3 - 1
ActionTowerDefense/Assets/Scripts/UI/ShopUI.cs

@@ -68,8 +68,10 @@ public class ShopUI : MonoBehaviour
             {
                 a = 3;
             }
-            while (true)
+            int b = 0;
+            while (b < 10)
             {
+                b++;
                 randId = Random.Range(0, singleTreasureConfigs.Count);
                 if (!randomTreasure.Exists(x => x == singleTreasureConfigs[randId].ID))
                 {