소스 검색

修复关卡数据加载

181404010226 2 달 전
부모
커밋
835d52f1ea

+ 34 - 26
assets/Scenes/GameLevel.scene

@@ -13300,7 +13300,7 @@
   {
     "__type__": "cc.Node",
     "_name": "EnemyNumber",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 460
@@ -13348,7 +13348,7 @@
   {
     "__type__": "cc.Node",
     "_name": "EnemyNode",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 461
@@ -13376,7 +13376,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 606.552,
+      "x": 602.5,
       "y": -41,
       "z": 0
     },
@@ -13406,7 +13406,7 @@
   {
     "__type__": "cc.Node",
     "_name": "TopArea",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 462
@@ -13467,7 +13467,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Canvas-001",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 1
@@ -13525,7 +13525,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Camera",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 462
@@ -13684,7 +13684,7 @@
   {
     "__type__": "cc.Node",
     "_name": "EnergyBar",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 461
@@ -13745,7 +13745,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Foreground",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 468
@@ -13887,7 +13887,7 @@
   {
     "__type__": "cc.Node",
     "_name": "EnergyIcon",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 468
@@ -14106,7 +14106,7 @@
   {
     "__type__": "cc.Node",
     "_name": "CoinNode",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 461
@@ -14164,7 +14164,7 @@
   {
     "__type__": "cc.Node",
     "_name": "CoinLabel",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 480
@@ -14299,7 +14299,7 @@
   {
     "__type__": "cc.Node",
     "_name": "CoinDrop",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 480
@@ -14499,7 +14499,7 @@
   {
     "__type__": "cc.Node",
     "_name": "WaveInfo",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 461
@@ -14569,7 +14569,7 @@
   {
     "__type__": "cc.Node",
     "_name": "WaveNumber-后",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 490
@@ -14704,7 +14704,7 @@
   {
     "__type__": "cc.Node",
     "_name": "www",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 490
@@ -14813,7 +14813,7 @@
   {
     "__type__": "cc.Node",
     "_name": "WaveNumber-前",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 490
@@ -14948,7 +14948,7 @@
   {
     "__type__": "cc.Node",
     "_name": "WaveNumber-001",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 490
@@ -15080,7 +15080,7 @@
   {
     "__type__": "cc.Node",
     "_name": "波数",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 490
@@ -15364,7 +15364,7 @@
   {
     "__type__": "cc.Node",
     "_name": "tb-tx",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 460
@@ -15482,7 +15482,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 100,
+      "width": 135,
       "height": 34
     },
     "_anchorPoint": {
@@ -15504,19 +15504,19 @@
     "__prefab": null,
     "_alignFlags": 33,
     "_target": null,
-    "_left": 603.115,
-    "_right": -606.552,
+    "_left": -35,
+    "_right": -6.2,
     "_top": 74,
     "_bottom": 0,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
-    "_isAbsRight": true,
+    "_isAbsRight": false,
     "_isAbsTop": true,
     "_isAbsBottom": true,
     "_isAbsHorizontalCenter": true,
     "_isAbsVerticalCenter": true,
-    "_originalWidth": 100,
+    "_originalWidth": 135,
     "_originalHeight": 0,
     "_alignMode": 2,
     "_lockFlags": 0,
@@ -27617,6 +27617,14 @@
     "weaponUpgradeAni": {
       "__id__": 888
     },
+    "maxLevelBtnSprite": {
+      "__uuid__": "56873597-339d-4659-b782-47d1b0145851@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "normalUpgradeBtnSprite": {
+      "__uuid__": "1ea95b38-1b11-4a88-976d-022058fedb81@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
     "_id": "559UYtr0JMMIDyZSC3724N"
   },
   {
@@ -31005,7 +31013,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 11.744140624999998,
+      "x": 11.744140625000002,
       "y": 0,
       "z": 0
     },
@@ -31132,7 +31140,7 @@
     "_right": 0,
     "_top": 4.062999999999998,
     "_bottom": 0.37195384615384625,
-    "_horizontalCenter": 0.06382685122282608,
+    "_horizontalCenter": 0.0638268512228261,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
     "_isAbsRight": true,

+ 9 - 0
assets/resources/data/levels.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.0",
+  "importer": "directory",
+  "imported": true,
+  "uuid": "5640b80c-eec1-4f9e-b73f-792327435aa6",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 116 - 0
assets/resources/data/levels/Level1.json

@@ -0,0 +1,116 @@
+{
+  "levelId": "Level1",
+  "name": "新手关卡(草地平原)",
+  "scene": "grassland",
+  "description": "新手引导关卡,学习基础塔防玩法",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手"
+  ],
+  "coinReward": 300,
+  "diamondReward": 20,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 1.0,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 30.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level1.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "0805e69f-fd58-4c20-a2f4-bbd50027b656",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 172 - 0
assets/resources/data/levels/Level2.json

@@ -0,0 +1,172 @@
+{
+  "levelId": "Level2",
+  "name": "丛林冒险(森林场景)",
+  "scene": "forest",
+  "description": "森林场景的塔防挑战,引入新的敌人类型和武器组合",
+  "backgroundImage": "images/LevelBackground/BG2",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜"
+  ],
+  "coinReward": 500,
+  "diamondReward": 30,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 1.2,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 5,
+          "spawnInterval": 6.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 8,
+          "spawnInterval": 6.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 30,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 10.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 10,
+          "spawnInterval": 6.0,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 6,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 5,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level2.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "c35edcb2-7c8d-4a83-a76f-cfc76177ee00",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 234 - 0
assets/resources/data/levels/Level3.json

@@ -0,0 +1,234 @@
+{
+  "levelId": "Level3",
+  "name": "魔法废墟(魔幻场景)",
+  "scene": "magic_ruins",
+  "description": "魔幻场景的塔防挑战,引入远程攻击敌人和隐身机制",
+  "backgroundImage": "images/LevelBackground/BG3",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草"
+  ],
+  "coinReward": 800,
+  "diamondReward": 50,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 1.4,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 5,
+          "spawnInterval": 6.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 5,
+          "spawnInterval": 6.0,
+          "spawnDelay": 10.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 45,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 30,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "wandering_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 5.0,
+          "characteristics": "左右摇摆, 近战范围大"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "wandering_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "左右摇摆, 近战范围大"
+        },
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 10.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        }
+      ]
+    },
+    {
+      "waveId": 6,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 10.0,
+          "characteristics": "隐身能力, 快速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 7,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 80,
+          "spawnInterval": 0.7,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 40,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "隐身能力, 快速移动"
+        },
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 6,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level3.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "a450b25c-45d1-4eca-8efa-1271f4c2550a",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 476 - 0
assets/resources/data/levels/Level4.json

@@ -0,0 +1,476 @@
+{
+  "levelId": "Level4",
+  "name": "钢铁堡垒(工业场景)",
+  "scene": "industrial",
+  "description": "工业场景的高难度挑战,引入BOSS战和超高防御敌人",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草",
+    "西瓜炸弹"
+  ],
+  "coinReward": 1000,
+  "diamondReward": 80,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 1.6,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 5,
+          "spawnInterval": 4.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 5,
+          "spawnInterval": 4.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 5,
+          "spawnInterval": 8.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 5,
+          "spawnInterval": 8.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 10,
+          "spawnInterval": 6.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 10,
+          "spawnInterval": 6.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 20.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 30,
+          "spawnInterval": 1.0,
+          "spawnDelay": 30.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 20.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 30,
+          "spawnInterval": 1.0,
+          "spawnDelay": 30.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 20,
+          "spawnInterval": 2.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 6,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 20,
+          "spawnInterval": 2.5,
+          "spawnDelay": 10.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 6,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 20,
+          "spawnInterval": 2.5,
+          "spawnDelay": 10.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 7,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        }
+      ]
+    },
+    {
+      "waveId": 7,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 30,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        }
+      ]
+    },
+    {
+      "waveId": 8,
+      "enemies": [
+        {
+          "enemyType": "bucket_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        }
+      ]
+    },
+    {
+      "waveId": 8,
+      "enemies": [
+        {
+          "enemyType": "bucket_zombie",
+          "count": 60,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 60.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 6,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level4.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "43a0f6d6-0e12-4909-936d-78fa4bed4b89",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 118 - 0
assets/resources/data/levels/Level5.json

@@ -0,0 +1,118 @@
+{
+  "levelId": "Level5",
+  "name": "终极挑战(赛博都市)",
+  "scene": "cyberpunk",
+  "description": "终极挑战关卡,包含多个BOSS和复杂的敌人组合",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草",
+    "西瓜炸弹",
+    "回旋镖盆栽"
+  ],
+  "coinReward": 1300,
+  "diamondReward": 100,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 1.8,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 8,
+          "spawnInterval": 3.0,
+          "spawnDelay": 10.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "mage_zombie",
+          "count": 8,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 6.0,
+          "spawnDelay": 15.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 1.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 2.5,
+          "spawnDelay": 8.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 8,
+          "spawnInterval": 3.5,
+          "spawnDelay": 20.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 5.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 7,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level5.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "e3f7b3ce-2c0f-4d16-ac59-730f77716159",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 119 - 0
assets/resources/data/levels/Level6.json

@@ -0,0 +1,119 @@
+{
+  "levelId": "Level6",
+  "name": "沙漠绿洲(沙漠场景)",
+  "scene": "desert",
+  "description": "沙漠场景的挑战,炎热环境下的生存战斗",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草",
+    "西瓜炸弹",
+    "回旋镖盆栽",
+    "炙热辣椒"
+  ],
+  "coinReward": 1800,
+  "diamondReward": 120,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 2.0,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 18,
+          "spawnInterval": 1.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 4,
+          "spawnInterval": 6.0,
+          "spawnDelay": 12.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 5,
+          "spawnInterval": 5.0,
+          "spawnDelay": 8.0,
+          "characteristics": "远程魔法子弹攻击防御塔"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 3,
+          "spawnInterval": 8.0,
+          "spawnDelay": 15.0,
+          "characteristics": "远程弓箭攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 1.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 4,
+          "spawnInterval": 10.0,
+          "spawnDelay": 20.0,
+          "characteristics": "隐身能力, 快速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 4.0,
+          "spawnDelay": 25.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 7,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level6.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "4011cdaa-c6a5-4d8c-ac29-cf0c5fe22800",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 57 - 0
assets/resources/data/levels/Level7.json

@@ -0,0 +1,57 @@
+{
+  "levelId": "Level7",
+  "name": "冰雪王国(冰雪场景)",
+  "scene": "ice",
+  "description": "冰雪场景的极地挑战,寒冷环境下的防御战",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草",
+    "西瓜炸弹",
+    "回旋镖盆栽",
+    "炙热辣椒",
+    "仙人散弹"
+  ],
+  "coinReward": 2200,
+  "diamondReward": 150,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 2.2,
+  "waves": [
+    {
+      "waveId": 3,
+      "enemies": []
+    },
+    {
+      "waveId": 4,
+      "enemies": []
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 8,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level7.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "eefefa29-49ef-4875-9d01-0d4c020746ea",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 154 - 0
assets/resources/data/levels/Level8.json

@@ -0,0 +1,154 @@
+{
+  "levelId": "Level8",
+  "name": "火山熔岩(火山场景)",
+  "scene": "volcano",
+  "description": "火山场景的极限挑战,熔岩环境下的终极考验",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草",
+    "西瓜炸弹",
+    "回旋镖盆栽",
+    "炙热辣椒",
+    "仙人散弹",
+    "秋葵导弹"
+  ],
+  "coinReward": 2500,
+  "diamondReward": 170,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 2.4,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 30,
+          "spawnInterval": 1.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 8.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "wandering_zombie",
+          "count": 6,
+          "spawnInterval": 5.0,
+          "spawnDelay": 15.0,
+          "characteristics": "左右摇摆, 近战范围大"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 25,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 8,
+          "spawnInterval": 4.0,
+          "spawnDelay": 10.0,
+          "characteristics": "远程魔法子弹攻击防御塔"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 6,
+          "spawnInterval": 6.0,
+          "spawnDelay": 18.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "barrel_zombie",
+          "count": 4,
+          "spawnInterval": 10.0,
+          "spawnDelay": 25.0,
+          "characteristics": "爆炸伤害, 自爆攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 0.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 12,
+          "spawnInterval": 2.5,
+          "spawnDelay": 12.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 8,
+          "spawnInterval": 6.0,
+          "spawnDelay": 20.0,
+          "characteristics": "隐身能力, 快速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 8.0,
+          "spawnDelay": 45.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 8,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level8.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "d70a2976-f9ea-40eb-89d8-d6f779273cc5",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 174 - 0
assets/resources/data/levels/Level9.json

@@ -0,0 +1,174 @@
+{
+  "levelId": "Level9",
+  "name": "终极试炼(终极场景)",
+  "scene": "ultimate",
+  "description": "终极试炼关卡,解锁最后的植物武器,面对最强挑战",
+  "backgroundImage": "images/LevelBackground/BG1",
+  "availableWeapons": [
+    "毛豆射手",
+    "尖胡萝卜",
+    "锯齿草",
+    "西瓜炸弹",
+    "回旋镖盆栽",
+    "炙热辣椒",
+    "仙人散弹",
+    "秋葵导弹",
+    "狼牙棒"
+  ],
+  "coinReward": 3000,
+  "diamondReward": 200,
+  "initialCoins": 100,
+  "timeLimit": 300,
+  "difficulty": "normal",
+  "healthMultiplier": 2.6,
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 40,
+          "spawnInterval": 0.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 15,
+          "spawnInterval": 2.5,
+          "spawnDelay": 5.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "wandering_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 12.0,
+          "characteristics": "左右摇摆, 近战范围大"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 35,
+          "spawnInterval": 0.6,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 12,
+          "spawnInterval": 3.0,
+          "spawnDelay": 8.0,
+          "characteristics": "远程魔法子弹攻击防御塔"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 15.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "barrel_zombie",
+          "count": 6,
+          "spawnInterval": 8.0,
+          "spawnDelay": 22.0,
+          "characteristics": "爆炸伤害, 自爆攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 30,
+          "spawnInterval": 0.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 15,
+          "spawnInterval": 2.0,
+          "spawnDelay": 10.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 12,
+          "spawnInterval": 4.0,
+          "spawnDelay": 18.0,
+          "characteristics": "隐身能力, 快速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 25.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        },
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 60.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 10,
+          "spawnInterval": 6.0,
+          "spawnDelay": 40.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "终极BOSS",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 30.0,
+          "characteristics": "极高生命, 全屏攻击, 无敌阶段, 召唤军团"
+        }
+      ]
+    }
+  ],
+  "levelSettings": {
+    "energyMax": 9,
+    "energyMaxUpgrades": [
+      5,
+      10,
+      15,
+      20,
+      25,
+      30,
+      40,
+      50,
+      60,
+      70,
+      80,
+      90,
+      100,
+      120,
+      150,
+      200,
+      300,
+      400,
+      500,
+      500
+    ]
+  }
+}

+ 11 - 0
assets/resources/data/levels/Level9.json.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "2.0.1",
+  "importer": "json",
+  "imported": true,
+  "uuid": "e7fdd485-2420-49cf-b62c-a09f8934e813",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 1 - 2
assets/scripts/FourUI/TopBarController.ts

@@ -53,11 +53,10 @@ export class TopBarController extends Component {
   }
 
   /* 绑定按钮事件 */
+  //看广告才能获取的货币
   private bindButtons() {
     this.moneyAddBtn?.on(Button.EventType.CLICK, () => this.addMoney(100), this);
     this.diamondAddBtn?.on(Button.EventType.CLICK, () => this.addDiamonds(20), this);
-
-
   }
 
   /* ================= 业务逻辑 ================= */

+ 20 - 0
assets/scripts/FourUI/UpgradeSystem/UpgradeController.ts

@@ -70,6 +70,10 @@ export class UpgradeController extends Component {
     @property(PopUPAni) upgradeAni: PopUPAni = null;    // Canvas/UpgradeUI/UpgradePanel上的PopUPAni组件
     @property(UpgradeAni) weaponUpgradeAni: UpgradeAni = null;    // 武器升级动画组件
     
+    // 满级按钮图片
+    @property(SpriteFrame) maxLevelBtnSprite: SpriteFrame = null;    // 武器满级时的灰色按钮图片
+    @property(SpriteFrame) normalUpgradeBtnSprite: SpriteFrame = null;    // 正常升级按钮图片
+    
     // 数据管理
     private saveDataManager: SaveDataManager = null;
     private weaponsConfig: any = null;
@@ -608,7 +612,23 @@ export class UpgradeController extends Component {
             if (this.panelCostLabel) {
                 this.panelCostLabel.string = "已满级";
             }
+            
+            // 替换升级按钮为灰色图片
+            if (this.panelUpgradeBtn && this.maxLevelBtnSprite) {
+                const btnSprite = this.panelUpgradeBtn.getComponent(Sprite);
+                if (btnSprite) {
+                    btnSprite.spriteFrame = this.maxLevelBtnSprite;
+                }
+            }
         } else {
+            // 恢复正常升级按钮图片
+            if (this.panelUpgradeBtn && this.normalUpgradeBtnSprite) {
+                const btnSprite = this.panelUpgradeBtn.getComponent(Sprite);
+                if (btnSprite) {
+                    btnSprite.spriteFrame = this.normalUpgradeBtnSprite;
+                }
+            }
+            
             // 从upgradeConfig获取升级费用
             if (weaponConfig.upgradeConfig?.levels) {
                 const levelConfig = weaponConfig.upgradeConfig.levels[weaponData.level.toString()];

+ 39 - 35
assets/scripts/LevelSystem/SaveDataManager.ts

@@ -957,41 +957,45 @@ export class SaveDataManager {
                 };
             }
             
-            // 如果JSON中没有奖励配置,尝试直接从JSON文件读取
-             const jsonPath = `data/levels/Level${levelId}`;
-             console.log(`[SaveDataManager] 尝试从JSON文件加载: ${jsonPath}`);
-             return new Promise((resolve) => {
-                 resources.load(jsonPath, JsonAsset, (err, asset) => {
-                     if (err || !asset) {
-                         console.warn(`无法加载关卡${levelId}的JSON配置:`, err);
-                         resolve(null);
-                         return;
-                     }
-                     
-                     const jsonData = asset.json;
-                     console.log(`[SaveDataManager] JSON数据:`, jsonData);
-                     
-                     // 修复字段名称映射:直接从JSON根级别读取coinReward和diamondReward
-                     if (jsonData && (jsonData.coinReward !== undefined || jsonData.diamondReward !== undefined)) {
-                         const rewardData = {
-                             money: jsonData.coinReward || 0,
-                             diamonds: jsonData.diamondReward || 0
-                         };
-                         resolve(rewardData);
-                     } else if (jsonData && jsonData.rewards) {
-                         // 兼容嵌套在rewards对象中的情况
-                         const rewardData = {
-                             money: jsonData.rewards.coins || jsonData.rewards.coinReward || 0,
-                             diamonds: jsonData.rewards.diamonds || jsonData.rewards.diamondReward || 0
-                         };
-                         console.log(`[SaveDataManager] 从JSON.rewards获取到奖励:`, rewardData);
-                         resolve(rewardData);
-                     } else {
-                         console.warn(`[SaveDataManager] JSON中未找到奖励配置`);
-                         resolve(null);
-                     }
-                 });
-             });
+            // 如果JSON中没有奖励配置,尝试使用BundleLoader从data Bundle加载
+            const jsonPath = `levels/Level${levelId}`;
+            console.log(`[SaveDataManager] 尝试使用BundleLoader从data Bundle加载: ${jsonPath}`);
+            
+            try {
+                const bundleLoader = BundleLoader.getInstance();
+                const asset = await bundleLoader.loadDataJson(jsonPath);
+                
+                if (!asset || !asset.json) {
+                    console.warn(`无法加载关卡${levelId}的JSON配置`);
+                    return null;
+                }
+                
+                const jsonData = asset.json;
+                console.log(`[SaveDataManager] JSON数据:`, jsonData);
+                
+                // 修复字段名称映射:直接从JSON根级别读取coinReward和diamondReward
+                if (jsonData && (jsonData.coinReward !== undefined || jsonData.diamondReward !== undefined)) {
+                    const rewardData = {
+                        money: jsonData.coinReward || 0,
+                        diamonds: jsonData.diamondReward || 0
+                    };
+                    return rewardData;
+                } else if (jsonData && jsonData.rewards) {
+                    // 兼容嵌套在rewards对象中的情况
+                    const rewardData = {
+                        money: jsonData.rewards.coins || jsonData.rewards.coinReward || 0,
+                        diamonds: jsonData.rewards.diamonds || jsonData.rewards.diamondReward || 0
+                    };
+                    console.log(`[SaveDataManager] 从JSON.rewards获取到奖励:`, rewardData);
+                    return rewardData;
+                } else {
+                    console.warn(`[SaveDataManager] JSON中未找到奖励配置`);
+                    return null;
+                }
+            } catch (error) {
+                console.warn(`使用BundleLoader加载关卡${levelId}配置失败:`, error);
+                return null;
+            }
             
         } catch (error) {
             console.error(`获取关卡${levelId}奖励配置失败:`, error);