Ver código fonte

难度选择

baowen 1 dia atrás
pai
commit
a29b2713bf

+ 6 - 6
assets/editor/image/bg2.jpg.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.27",
   "importer": "image",
   "imported": true,
-  "uuid": "eab31623-2705-4800-abab-5c8914753a77",
+  "uuid": "69761276-f2a4-4325-85aa-83b1d9180576",
   "files": [
     ".jpg",
     ".json"
@@ -10,14 +10,14 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "eab31623-2705-4800-abab-5c8914753a77@6c48a",
+      "uuid": "69761276-f2a4-4325-85aa-83b1d9180576@6c48a",
       "displayName": "bg2",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
-        "imageUuidOrDatabaseUri": "eab31623-2705-4800-abab-5c8914753a77",
+        "imageUuidOrDatabaseUri": "69761276-f2a4-4325-85aa-83b1d9180576",
         "isUuid": true,
         "visible": false,
         "minfilter": "linear",
@@ -34,7 +34,7 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "eab31623-2705-4800-abab-5c8914753a77@f9941",
+      "uuid": "69761276-f2a4-4325-85aa-83b1d9180576@f9941",
       "displayName": "bg2",
       "id": "f9941",
       "name": "spriteFrame",
@@ -113,7 +113,7 @@
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "eab31623-2705-4800-abab-5c8914753a77@6c48a",
+        "imageUuidOrDatabaseUri": "69761276-f2a4-4325-85aa-83b1d9180576@6c48a",
         "atlasUuid": "",
         "trimType": "auto"
       },
@@ -129,6 +129,6 @@
     "type": "sprite-frame",
     "hasAlpha": false,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "eab31623-2705-4800-abab-5c8914753a77@6c48a"
+    "redirect": "69761276-f2a4-4325-85aa-83b1d9180576@6c48a"
   }
 }

+ 3 - 2
assets/editor/script/LevelContainer.ts

@@ -101,12 +101,13 @@ export class LevelContainer extends Component {
             }
         });
         var randomIndex = randomRangeInt(0, itemSpinePaths.length);
+        // console.log("物品数量", itemcnt,"物品缩放数组长度",Difficulty.difficutyData.scales.length,"动画路径长度",itemSpinePaths.length);
         // 生成物品
         for (let i = 0; i < itemcnt; i++) {
             // 随机选择一个物品
             randomIndex = Skin.skinData.singleSelect == "true"?randomIndex: randomRangeInt(0, itemSpinePaths.length);
-            this.createItem(itemSpinePaths[randomIndex], this._itemScales[i]);
-        }
+            this.createItem(itemSpinePaths[randomIndex], Difficulty.difficutyData.scales[i]);      
+          }
     }
 
     /**

+ 1 - 1
assets/editor/script/SelectDifficultyPanel.ts

@@ -79,7 +79,7 @@ export class SelectDifficultyPanel extends Component {
     onUseSysDataClick()
     {
         Difficulty.setDataToDefault();
-        Difficulty.createOrDeleteOtherScale(); // 重置时应用新逻辑
+        // Difficulty.createOrDeleteOtherScale(); // 重置时应用新逻辑
         this.init(); // 刷新UI
         this.node.active = false
         EventMgr.ins.dispatchEvent("regenerate")