181404010226 2 сар өмнө
parent
commit
5d2c9b8f28

+ 5 - 5
assets/Scenes/GameLevel.scene

@@ -1515,7 +1515,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 172,
+      "width": 119.44,
       "height": 40
     },
     "_anchorPoint": {
@@ -1548,8 +1548,8 @@
     "_string": "1200",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 36,
-    "_fontSize": 36,
+    "_actualFontSize": 25,
+    "_fontSize": 25,
     "_fontFamily": "Arial",
     "_lineHeight": 40,
     "_overflow": 0,
@@ -31016,7 +31016,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 11.744140625000002,
+      "x": 11.744140624999998,
       "y": 0,
       "z": 0
     },
@@ -31143,7 +31143,7 @@
     "_right": 0,
     "_top": 4.062999999999998,
     "_bottom": 0.37195384615384625,
-    "_horizontalCenter": 0.0638268512228261,
+    "_horizontalCenter": 0.06382685122282608,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
     "_isAbsRight": true,

+ 1 - 1
assets/data/enemies.json

@@ -9,7 +9,7 @@
       "defense": 0,
       "speed": 20.0,
       "dropEnergy": 1,
-      "dropCoins": 1
+      "dropCoins": 2
     },
     "movement": {
       "pattern": "direct",

+ 0 - 1138
assets/data/enemies_backup_20250923_145002.json

@@ -1,1138 +0,0 @@
-[
-  {
-    "id": "normal_zombie",
-    "name": "普通僵尸",
-    "type": "basic",
-    "stats": {
-      "health": 40,
-      "maxHealth": 40,
-      "defense": 0,
-      "speed": 20.0,
-      "dropEnergy": 1,
-      "dropCoins": 5
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 20.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 1,
-      "attackRange": 30.0,
-      "attackSpeed": 2.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 2.0,
-      "attackType": "melee",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 50.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/001",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": "props/baseball_bat"
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/zombie_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/001",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "props/baseball_bat"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/dao2.mp3",
-      "death_sound": "data/弹球音效/normal zombie die 1.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "roadblock_zombie",
-    "name": "路障僵尸",
-    "type": "armored",
-    "stats": {
-      "health": 55,
-      "maxHealth": 55,
-      "defense": 1,
-      "speed": 15.0,
-      "dropEnergy": 1,
-      "dropCoins": 8
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 15.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 30.0,
-      "attackSpeed": 3.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 3.0,
-      "attackType": "melee",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/002",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": "props/magic_staff"
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/roadblock_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/002",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "props/magic_staff"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/bow.mp3",
-      "death_sound": "data/弹球音效/normal zombie die 2.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "wandering_zombie",
-    "name": "漫步僵尸",
-    "type": "wanderer",
-    "stats": {
-      "health": 45,
-      "maxHealth": 45,
-      "defense": 0,
-      "speed": 22.0,
-      "dropEnergy": 1,
-      "dropCoins": 6
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 22.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "sway",
-      "swingAmplitude": 20.0,
-      "swingFrequency": 2.0,
-      "speedVariation": 0.2
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 30.0,
-      "attackSpeed": 3.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 3.0,
-      "attackType": "melee_weapon",
-      "attackDelay": 1.0,
-      "weaponType": "baseball_bat",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/003",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": "props/bow"
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/wandering_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/003",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "props/bow"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/MagicianAttack.mp3",
-      "death_sound": "data/弹球音效/normal zombie die 3.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "mage_zombie",
-    "name": "法师僵尸",
-    "type": "ranged_caster",
-    "stats": {
-      "health": 30,
-      "maxHealth": 30,
-      "defense": 0,
-      "speed": 10.0,
-      "dropEnergy": 1,
-      "dropCoins": 10
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 10.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 250.0,
-      "attackSpeed": 4.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 4.0,
-      "attackType": "magic_projectile",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "magic_bolt",
-      "projectileSpeed": 50.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/004",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": ""
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/mage_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/004",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "nan"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/zhanshiAtk.mp3",
-      "death_sound": "data/弹球音效/normal zombie die 4.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "archer_zombie",
-    "name": "弓箭僵尸",
-    "type": "ranged_archer",
-    "stats": {
-      "health": 30,
-      "maxHealth": 30,
-      "defense": 0,
-      "speed": 15.0,
-      "dropEnergy": 1,
-      "dropCoins": 12
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 15.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 1,
-      "attackRange": 400.0,
-      "attackSpeed": 2.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 4.0,
-      "attackType": "arrow_projectile",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "arrow",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/005",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": ""
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/archer_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/005",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "nan"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp3",
-      "death_sound": "data/弹球音效/normal zombie die 5.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "stealth_zombie",
-    "name": "隐身僵尸",
-    "type": "stealth",
-    "stats": {
-      "health": 35,
-      "maxHealth": 35,
-      "defense": 0,
-      "speed": 20.0,
-      "dropEnergy": 1,
-      "dropCoins": 7
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 20.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 30.0,
-      "attackSpeed": 3.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 3.0,
-      "attackType": "stealth_strike",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/006",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": ""
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/stealth_walk",
-      "blockSound": "",
-      "stealthSound": "audio/stealth_activate",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/006",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "nan"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp3",
-      "death_sound": "data/弹球音效/normal zombie die 6.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "Null",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "bucket_zombie",
-    "name": "铁桶僵尸",
-    "type": "heavy_armor",
-    "stats": {
-      "health": 75,
-      "maxHealth": 75,
-      "defense": 2,
-      "speed": 10.0,
-      "dropEnergy": 1,
-      "dropCoins": 15
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 10.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 30.0,
-      "attackSpeed": 3.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 4.0,
-      "attackType": "heavy_melee",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/007",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": "props/iron_gate"
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/bucket_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "audio/armor_break",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/007",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "props/iron_gate"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp5",
-      "death_sound": "data/弹球音效/normal zombie die 7.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "Null",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "barrel_zombie",
-    "name": "火药桶僵尸",
-    "type": "explosive",
-    "stats": {
-      "health": 40,
-      "maxHealth": 40,
-      "defense": 0,
-      "speed": 20.0,
-      "dropEnergy": 1,
-      "dropCoins": 20
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 20.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 30.0,
-      "attackSpeed": 3.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 3.0,
-      "attackType": "melee",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/008",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": "props/tombstone"
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/barrel_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "audio/barrel_fuse",
-      "volume": 1.0
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/008",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "props/tombstone"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp3",
-      "death_sound": "data/弹球音效/boss die.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "Null"
-    },
-    "boss": {
-      "is_boss": false,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.0,
-      "rage_speed_multiplier": 1.0
-    },
-    "special_abilities": []
-  },
-  {
-    "id": "boss1_gatekeeper",
-    "name": "BOSS1",
-    "type": "boss",
-    "stats": {
-      "health": 500,
-      "maxHealth": 500,
-      "defense": 2,
-      "speed": 7.0,
-      "dropEnergy": 1,
-      "dropCoins": 50
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 7.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 3,
-      "attackRange": 30.0,
-      "attackSpeed": 4.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 4.0,
-      "attackType": "gate_slam",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/009",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": "props/cyber_arm"
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/boss1_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "specialAbilities": [
-      {
-        "type": "charge_attack",
-        "damage": 1,
-        "range": 150.0,
-        "cooldown": 8.0
-      },
-      {
-        "type": "area_attack",
-        "damage": 2,
-        "range": 100.0,
-        "cooldown": 12.0
-      }
-    ],
-    "bossConfig": {
-      "isBoss": true,
-      "phases": 1,
-      "enrageThreshold": 0.3,
-      "enrageDamageMultiplier": 1.5,
-      "enrageSpeedMultiplier": 1.3
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/009",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "props/cyber_arm"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp3",
-      "death_sound": "data/弹球音效/boss die.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": true,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.5,
-      "rage_speed_multiplier": 1.3
-    },
-    "special_abilities": [
-      {
-        "type": "charge_attack",
-        "damage": 1,
-        "range": 150,
-        "cooldown": 8
-      },
-      {
-        "type": "area_attack",
-        "damage": 2,
-        "range": 100,
-        "cooldown": 12
-      }
-    ]
-  },
-  {
-    "id": "boss2_gravedigger",
-    "name": "BOSS2",
-    "type": "boss",
-    "stats": {
-      "health": 500,
-      "maxHealth": 500,
-      "defense": 3,
-      "speed": 7.0,
-      "dropEnergy": 1,
-      "dropCoins": 60
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 7.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 3,
-      "attackRange": 30.0,
-      "attackSpeed": 4.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 4.0,
-      "attackType": "tombstone_smash",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/010",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": ""
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/boss2_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "specialAbilities": [
-      {
-        "type": "charge_attack",
-        "damage": 1,
-        "range": 150.0,
-        "cooldown": 8.0
-      },
-      {
-        "type": "area_attack",
-        "damage": 2,
-        "range": 100.0,
-        "cooldown": 12.0
-      }
-    ],
-    "bossConfig": {
-      "isBoss": true,
-      "phases": 1,
-      "enrageThreshold": 0.3,
-      "enrageDamageMultiplier": 1.5,
-      "enrageSpeedMultiplier": 1.3
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/010",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "nan"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp3",
-      "death_sound": "data/弹球音效/boss die.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": true,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.5,
-      "rage_speed_multiplier": 1.3
-    },
-    "special_abilities": [
-      {
-        "type": "charge_attack",
-        "damage": 1,
-        "range": 150,
-        "cooldown": 8
-      },
-      {
-        "type": "area_attack",
-        "damage": 2,
-        "range": 100,
-        "cooldown": 12
-      }
-    ]
-  },
-  {
-    "id": "boss3_cyborg",
-    "name": "BOSS3",
-    "type": "boss",
-    "stats": {
-      "health": 250,
-      "maxHealth": 250,
-      "defense": 1,
-      "speed": 5.0,
-      "dropEnergy": 1,
-      "dropCoins": 30
-    },
-    "movement": {
-      "pattern": "direct",
-      "speed": 5.0,
-      "patrolRange": 100,
-      "chaseRange": 200,
-      "rotationSpeed": 180.0,
-      "moveType": "straight",
-      "swingAmplitude": 0.0,
-      "swingFrequency": 0.0,
-      "speedVariation": 0.1
-    },
-    "combat": {
-      "attackDamage": 2,
-      "attackRange": 80.0,
-      "attackSpeed": 4.0,
-      "canBlock": false,
-      "blockChance": 0.0,
-      "blockDamageReduction": 0.5,
-      "attackCooldown": 4.0,
-      "attackType": "cyber_arm_combo",
-      "attackDelay": 1.0,
-      "weaponType": "none",
-      "projectileType": "none",
-      "projectileSpeed": 100.0
-    },
-    "visualConfig": {
-      "spritePath": "Animation/EnemyAni/011",
-      "scale": 1.0,
-      "animationSpeed": 1.0,
-      "flipX": false,
-      "tint": "#FFFFFF",
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weaponProp": ""
-    },
-    "audioConfig": {
-      "attackSound": "enemy_attack",
-      "deathSound": "enemy_death",
-      "hitSound": "enemy_hit",
-      "walkSound": "audio/boss3_walk",
-      "blockSound": "",
-      "stealthSound": "",
-      "armorBreakSound": "",
-      "fuseSound": "",
-      "volume": 1.0
-    },
-    "specialAbilities": [
-      {
-        "type": "charge_attack",
-        "damage": 1,
-        "range": 150.0,
-        "cooldown": 8.0
-      },
-      {
-        "type": "area_attack",
-        "damage": 2,
-        "range": 100.0,
-        "cooldown": 12.0
-      }
-    ],
-    "bossConfig": {
-      "isBoss": true,
-      "phases": 1,
-      "enrageThreshold": 0.3,
-      "enrageDamageMultiplier": 1.5,
-      "enrageSpeedMultiplier": 1.3
-    },
-    "visual": {
-      "sprite_path": "Animation/EnemyAni/011",
-      "scale": 1.0,
-      "animation_speed": 1.0,
-      "flip_horizontal": false,
-      "animations": {
-        "idle": "idle",
-        "walk": "walk",
-        "attack": "attack",
-        "death": "dead"
-      },
-      "weapon_prop": "nan"
-    },
-    "audio": {
-      "attack_sound": "data/弹球音效/hammer1.mp3",
-      "death_sound": "data/弹球音效/boss die.mp3",
-      "hit_sound": "Null",
-      "walk_sound": "Null",
-      "block_sound": "nan",
-      "stealth_sound": "nan",
-      "armor_break_sound": "nan",
-      "fuse_sound": "nan"
-    },
-    "boss": {
-      "is_boss": true,
-      "phases": 1,
-      "rage_threshold": 0.3,
-      "rage_damage_multiplier": 1.5,
-      "rage_speed_multiplier": 1.3
-    },
-    "special_abilities": [
-      {
-        "type": "charge_attack",
-        "damage": 1,
-        "range": 150,
-        "cooldown": 8
-      },
-      {
-        "type": "area_attack",
-        "damage": 2,
-        "range": 100,
-        "cooldown": 12
-      }
-    ]
-  }
-]

+ 51 - 38
assets/scripts/CombatSystem/BallController.ts

@@ -8,6 +8,7 @@ import { BallControllerConfig } from '../Core/ConfigManager';
 import { WeaponInfo } from './BlockSelection/WeaponInfo';
 import { BlockInfo } from './BlockSelection/BlockInfo';
 import { BallAni } from '../Animations/BallAni';
+import { BundleLoader } from '../Core/BundleLoader';
 const { ccclass, property } = _decorator;
 
 @ccclass('BallController')
@@ -27,11 +28,11 @@ export class BallController extends Component {
     public placedBlocksContainer: Node = null;
 
     // 球控制器配置文件
-    @property({
-        type: JsonAsset,
-        tooltip: '拖拽ballController.json配置文件到这里'
-    })
-    public ballControllerConfig: JsonAsset = null;
+    // @property({
+    //     type: JsonAsset,
+    //     tooltip: '拖拽ballController.json配置文件到这里'
+    // })
+    // public ballControllerConfig: JsonAsset = null;  // 已改为动态加载
 
     // 球的移动速度(从配置文件加载)
     public baseSpeed: number = 60; 
@@ -165,7 +166,7 @@ export class BallController extends Component {
     // 小球位置检查相关变量
     private lastPositionCheckTime: number = 0; // 上次位置检查的时间
 
-    start() {
+    async start() {
         // 如果没有指定placedBlocksContainer,尝试找到它
         if (!this.placedBlocksContainer) {
             this.placedBlocksContainer = find('Canvas/GameLevelUI/GameArea/PlacedBlocks');
@@ -177,7 +178,7 @@ export class BallController extends Component {
 
         
         // 加载配置
-        this.loadConfig();
+        await this.loadConfig();
         
         // 只进行初始设置,不创建小球
         this.calculateGameBounds();
@@ -196,37 +197,49 @@ export class BallController extends Component {
      */
 
     // 加载配置
-    private loadConfig() {
-        if (this.ballControllerConfig && this.ballControllerConfig.json) {
-            this.config = this.ballControllerConfig.json as BallControllerConfig;
-            this.applyConfig();
-            console.log('[BallController] ✅ 配置文件通过装饰器加载成功:', this.config);
-        } else {
-            console.warn('[BallController] ⚠️ 配置文件未设置,使用默认值');
-            // 使用默认配置
-            this.config = {
-                baseSpeed: 60,
-                maxReflectionRandomness: 0.2,
-                antiTrapTimeWindow: 5.0,
-                antiTrapHitThreshold: 5,
-                deflectionAttemptThreshold: 3,
-                antiTrapDeflectionMultiplier: 3.0,
-                FIRE_COOLDOWN: 0.05,
-                ballRadius: 10,
-                gravityScale: 0,
-                linearDamping: 0,
-                angularDamping: 0,
-                colliderGroup: 1,
-                colliderTag: 1,
-                friction: 0,
-                restitution: 1,
-                safeDistance: 50,
-                edgeOffset: 20,
-                sensor: false,
-                maxAttempts: 50
-            };
-            this.applyConfig();
-        }
+    private async loadConfig(): Promise<void> {
+        try {
+            const bundleLoader = BundleLoader.getInstance();
+            const ballControllerData = await bundleLoader.loadDataJson('ballController');
+            
+            if (ballControllerData && ballControllerData.json) {
+                this.config = ballControllerData.json as BallControllerConfig;
+                this.applyConfig();
+                console.log('[BallController] ✅ 配置文件通过BundleLoader加载成功:', this.config);
+            } else {
+                console.warn('[BallController] ⚠️ 配置文件加载失败,使用默认值');
+                this.useDefaultConfig();
+            }
+        } catch (error) {
+            console.error('[BallController] 加载配置文件失败:', error);
+            this.useDefaultConfig();
+        }
+    }
+
+    private useDefaultConfig(): void {
+        // 使用默认配置
+        this.config = {
+            baseSpeed: 60,
+            maxReflectionRandomness: 0.2,
+            antiTrapTimeWindow: 5.0,
+            antiTrapHitThreshold: 5,
+            deflectionAttemptThreshold: 3,
+            antiTrapDeflectionMultiplier: 3.0,
+            FIRE_COOLDOWN: 0.05,
+            ballRadius: 10,
+            gravityScale: 0,
+            linearDamping: 0,
+            angularDamping: 0,
+            colliderGroup: 1,
+            colliderTag: 1,
+            friction: 0,
+            restitution: 1,
+            safeDistance: 50,
+            edgeOffset: 20,
+            sensor: false,
+            maxAttempts: 50
+        };
+        this.applyConfig();
     }
 
     // 应用配置

+ 26 - 11
assets/scripts/CombatSystem/BlockSelection/GameBlockSelection.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Node, Button, Label, find, EventTouch, Vec2, Vec3, UITransform, Rect, Collider2D, Graphics, Color, JsonAsset } from 'cc';
+import { _decorator, Component, Node, Button, Label, find, EventTouch, Vec2, Vec3, UITransform, Rect, Collider2D, Graphics, Color } from 'cc';
 import { LevelSessionManager } from '../../Core/LevelSessionManager';
 import { BallController } from '../BallController';
 import { BlockManager } from '../BlockManager';
@@ -77,11 +77,14 @@ export class GameBlockSelection extends Component {
     public cameraNode: Node = null;
 
     // 武器配置JsonAsset - 通过装饰器预加载
-    @property({
-        type: JsonAsset,
-        tooltip: '拖拽weapons.json文件到这里,实现配置预加载'
-    })
-    public weaponsConfig: JsonAsset = null;
+    // @property({
+    //     type: JsonAsset,
+    //     tooltip: '拖拽weapons.json文件到这里,实现配置预加载'
+    // })
+    // public weaponsConfig: JsonAsset = null;
+    
+    // 武器配置数据,通过 BundleLoader 异步加载
+    private weaponsConfigData: any = null;
 
     // 小球价格配置数据 - 通过BundleLoader动态加载
     private ballPriceConfigData: any = null;
@@ -283,6 +286,17 @@ export class GameBlockSelection extends Component {
             this.ballPriceConfigData = null;
         }
         
+        // 异步加载武器配置
+        try {
+            const bundleLoader = BundleLoader.getInstance();
+            const weaponsConfigAsset = await bundleLoader.loadDataJson('weapons');
+            this.weaponsConfigData = weaponsConfigAsset.json;
+            console.log('[GameBlockSelection] 武器配置加载成功:', this.weaponsConfigData);
+        } catch (error) {
+            console.warn('[GameBlockSelection] 武器配置加载失败:', error);
+            this.weaponsConfigData = null;
+        }
+        
         // 获取管理器实例
         this.session = LevelSessionManager.inst;
         
@@ -297,16 +311,17 @@ export class GameBlockSelection extends Component {
         if (this.blockManagerNode) {
             this.blockManager = this.blockManagerNode.getComponent(BlockManager);
             
-            // 如果武器配置已通过装饰器预加载,直接传递给BlockManager
-            if (this.weaponsConfig && this.weaponsConfig.json) {
-                // 通过公共方法将加载的配置传递给BlockManager
+            // 如果武器配置已通过 BundleLoader 加载,传递给BlockManager
+            if (this.weaponsConfigData) {
+                // 通过公共方法将加载的配置传递给BlockManager
                 if (this.blockManager && typeof this.blockManager.setPreloadedWeaponsConfig === 'function') {
-                    this.blockManager.setPreloadedWeaponsConfig(this.weaponsConfig.json);
+                    this.blockManager.setPreloadedWeaponsConfig(this.weaponsConfigData);
+                    console.log('[GameBlockSelection] 武器配置已传递给BlockManager');
                 } else {
                     console.warn('[GameBlockSelection] BlockManager不支持setPreloadedWeaponsConfig方法');
                 }
             } else {
-                console.warn('[GameBlockSelection] 武器配置未预加载,请在Inspector中拖拽weapons.json文件到weaponsConfig属性');
+                console.warn('[GameBlockSelection] 武器配置加载失败,BlockManager将使用默认配置');
             }
         } else {
             console.warn('BlockManager节点未绑定,请在Inspector中拖拽Canvas/GameLevelUI/BlockController节点');

+ 2 - 2
assets/scripts/CombatSystem/BulletEffects/BulletHitEffect.ts

@@ -369,8 +369,8 @@ export class BulletHitEffect extends Component {
         // 获取武器子弹组件来计算暴击
         const weaponBullet = this.getComponent(WeaponBullet);
         if (!weaponBullet) {
-            // 如果没有WeaponBullet组件,使用基础暴击率10%
-            const critChance = 0.1;
+            // 如果没有WeaponBullet组件,使用基础暴击率0%
+            const critChance = 0;
             const isCritical = Math.random() < critChance;
             
             if (isCritical) {

+ 19 - 17
assets/scripts/CombatSystem/Wall.ts

@@ -1,6 +1,7 @@
 import { _decorator, Component, Node, Label, find, JsonAsset } from 'cc';
 import { SaveDataManager } from '../LevelSystem/SaveDataManager';
 import EventBus, { GameEvents } from '../Core/EventBus';
+import { BundleLoader } from '../Core/BundleLoader';
 
 import { SkillManager } from './SkillSelection/SkillManager';
 const { ccclass, property } = _decorator;
@@ -18,11 +19,11 @@ export class Wall extends Component {
     })
     public heartLabelNode: Node = null;
 
-    @property({
-        type: JsonAsset,
-        tooltip: '墙体配置文件'
-    })
-    public wallConfigAsset: JsonAsset = null;
+    // @property({
+    //     type: JsonAsset,
+    //     tooltip: '墙体配置文件'
+    // })
+    // public wallConfigAsset: JsonAsset = null;  // 已改为动态加载
 
     // === 私有属性 ===
     private currentHealth: number = 100;
@@ -33,17 +34,18 @@ export class Wall extends Component {
     private wallConfig: any = null;
     private wallHpMap: Record<number, number> = {};
 
-    start() {
-        this.initializeWall();
+    async start() {
+        await this.initializeWall();
     }
 
     /**
      * 加载墙体配置
      */
-    private loadWallConfig(): void {
-        if (this.wallConfigAsset) {
-            try {
-                this.wallConfig = this.wallConfigAsset.json;
+    private async loadWallConfig(): Promise<void> {
+        try {
+            const wallData = await BundleLoader.getInstance().loadDataJson('wall');
+            if (wallData) {
+                this.wallConfig = wallData;
                 if (this.wallConfig && this.wallConfig.wallConfig && this.wallConfig.wallConfig.healthByLevel) {
                     // 转换字符串键为数字键
                     const healthByLevel = this.wallConfig.wallConfig.healthByLevel;
@@ -56,12 +58,12 @@ export class Wall extends Component {
                     console.warn('[Wall] 配置文件格式错误,使用默认配置');
                     this.useDefaultConfig();
                 }
-            } catch (parseErr) {
-                console.error('[Wall] 解析墙体配置失败:', parseErr);
+            } else {
+                console.warn('[Wall] wall.json加载失败,使用默认配置');
                 this.useDefaultConfig();
             }
-        } else {
-            console.warn('[Wall] 未挂载墙体配置文件,使用默认配置');
+        } catch (error) {
+            console.error('[Wall] 加载wall.json时出错:', error);
             this.useDefaultConfig();
         }
     }
@@ -82,7 +84,7 @@ export class Wall extends Component {
     /**
      * 初始化墙体
      */
-    private initializeWall() {
+    private async initializeWall() {
         // 初始化存档管理器
         this.saveDataManager = SaveDataManager.getInstance();
         if (!this.saveDataManager) {
@@ -91,7 +93,7 @@ export class Wall extends Component {
         }
 
         // 加载墙体配置
-        this.loadWallConfig();
+        await this.loadWallConfig();
         
         // 查找血量显示节点
         this.findHeartLabelNode();

+ 3 - 4
assets/scripts/CombatSystem/WeaponBullet.ts

@@ -749,7 +749,6 @@ export class WeaponBullet extends Component {
                 }
             }
         }
-        
         // 应用稀有度伤害倍数(合成升级效果)
         // 优先从BlockInfo中获取稀有度等级,如果不存在则从武器配置中获取
         let rarityLevel = 0; // 默认为common(0)
@@ -775,7 +774,7 @@ export class WeaponBullet extends Component {
             this.weaponConfig.runtimeStats = {
                 finalDamage: baseDamage,
                 finalCritDamage: baseDamage,
-                critChance: 0.1 // 基础暴击率10%
+                critChance: 0 // 基础暴击率0%
             };
             console.log(`[WeaponBullet] 无技能管理器 - 最终伤害: ${baseDamage}`);
             return;
@@ -790,7 +789,7 @@ export class WeaponBullet extends Component {
         const finalCritDamage = skillManager.applyCritDamageBonus(baseCritDamage);
         
         // 应用局内技能暴击率加成
-        const baseCritChance = 0.1; // 基础暴击率10%
+        const baseCritChance = 0; // 基础暴击率0%
         let critChance = baseCritChance;
         
         // 应用局内技能加成(SkillManager)
@@ -835,7 +834,7 @@ export class WeaponBullet extends Component {
      * 获取暴击率
      */
     public getCritChance(): number {
-        return this.weaponConfig?.runtimeStats?.critChance || 0.1;
+        return this.weaponConfig?.runtimeStats?.critChance || 0;
     }
     
     /**

+ 35 - 20
assets/scripts/Debug/WeaponsConfigTest.ts

@@ -1,4 +1,5 @@
-import { _decorator, Component, JsonAsset } from 'cc';
+import { _decorator, Component } from 'cc';
+import { BundleLoader } from '../Core/BundleLoader';
 const { ccclass, property } = _decorator;
 
 /**
@@ -8,27 +9,43 @@ const { ccclass, property } = _decorator;
 @ccclass('WeaponsConfigTest')
 export class WeaponsConfigTest extends Component {
     
-    @property({
-        type: JsonAsset,
-        tooltip: '拖拽weapons.json文件到这里进行测试'
-    })
-    public weaponsConfig: JsonAsset = null;
+    // @property({
+    //     type: JsonAsset,
+    //     tooltip: '拖拽weapons.json文件到这里进行测试'
+    // })
+    // public weaponsConfig: JsonAsset = null;
     
-    start() {
+    // 武器配置数据,通过 BundleLoader 异步加载
+    private weaponsConfigData: any = null;
+    
+    async start() {
+        await this.loadWeaponsConfig();
         this.testWeaponsConfig();
     }
     
+    /**
+     * 异步加载武器配置
+     */
+    private async loadWeaponsConfig() {
+        try {
+            const bundleLoader = BundleLoader.getInstance();
+            const weaponsConfigAsset = await bundleLoader.loadDataJson('weapons');
+            this.weaponsConfigData = weaponsConfigAsset.json;
+            console.log('[WeaponsConfigTest] 武器配置加载成功');
+        } catch (error) {
+            console.error('[WeaponsConfigTest] 武器配置加载失败:', error);
+            this.weaponsConfigData = null;
+        }
+    }
+    
     private testWeaponsConfig() {
         console.log('=== 武器配置测试开始 ===');
         
-        // 检查装饰器配置
-        if (this.weaponsConfig) {
-            console.log('✅ weaponsConfig装饰器属性已配置');
+        // 检查 BundleLoader 加载的配置
+        if (this.weaponsConfigData) {
+            console.log('✅ 武器配置通过 BundleLoader 加载成功');
             
-            if (this.weaponsConfig.json) {
-                console.log('✅ weaponsConfig.json数据存在');
-                
-                const data = this.weaponsConfig.json;
+            const data = this.weaponsConfigData;
                 
                 // 检查weapons数组
                 if (data.weapons && Array.isArray(data.weapons)) {
@@ -55,12 +72,9 @@ export class WeaponsConfigTest extends Component {
                     blockSizesCount: data.blockSizes?.length || 0
                 });
                 
-            } else {
-                console.error('❌ weaponsConfig.json为空');
-            }
         } else {
-            console.error('❌ weaponsConfig装饰器属性未配置');
-            console.log('请在Inspector中将weapons.json文件拖拽到weaponsConfig属性');
+            console.error('❌ 武器配置加载失败');
+            console.log('请检查 weapons.json 文件是否存在于 data 目录中');
         }
         
         console.log('=== 武器配置测试结束 ===');
@@ -69,7 +83,8 @@ export class WeaponsConfigTest extends Component {
     /**
      * 手动测试方法,可以在Inspector中调用
      */
-    public manualTest() {
+    public async manualTest() {
+        await this.loadWeaponsConfig();
         this.testWeaponsConfig();
     }
 }

+ 15 - 11
assets/scripts/FourUI/MainSystem/MainUIControlller.ts

@@ -26,7 +26,7 @@ export class MainUIController extends Component {
   @property(Label) upgradeNextHpLabel: Label = null;     // 升级后血量Label
 
   /* 墙体配置 */
-  @property(JsonAsset) wallConfigAsset: JsonAsset = null;  // 墙体配置JSON资源
+  // @property(JsonAsset) wallConfigAsset: JsonAsset = null;  // 墙体配置JSON资源 - 已改为动态加载
 
   /* 主功能按钮 */
   @property(Node) battleBtn: Node = null;            // 战斗
@@ -51,7 +51,7 @@ export class MainUIController extends Component {
     console.log('[MainUIController] onLoad 开始执行');
     
     this.sdm = SaveDataManager.getInstance();
-    this.loadWallConfig();
+    await this.loadWallConfig();
     this.sdm.initialize();
     console.log('[MainUIController] SaveDataManager 初始化完成');
 
@@ -101,17 +101,21 @@ export class MainUIController extends Component {
   /**
    * 加载墙体配置
    */
-  private loadWallConfig(): void {
+  private async loadWallConfig(): Promise<void> {
     try {
-      if (this.wallConfigAsset && this.wallConfigAsset.json) {
-        this.wallConfig = this.wallConfigAsset.json;
-        console.log('[MainUIController] 墙体配置加载成功:', this.wallConfig);
-        
-        // 将配置传递给SaveDataManager
-        this.sdm.setWallConfig(this.wallConfig);
-      } else {
-        console.error('[MainUIController] wallConfigAsset未设置或无效');
+      const bundleLoader = BundleLoader.getInstance();
+      const wallData = await bundleLoader.loadDataJson('wall');
+      
+      if (!wallData) {
+        console.error('[MainUIController] 墙体配置文件内容为空');
+        return;
       }
+      
+      this.wallConfig = wallData.json;
+      console.log('[MainUIController] 墙体配置加载成功:', this.wallConfig);
+      
+      // 将配置传递给SaveDataManager
+      this.sdm.setWallConfig(this.wallConfig);
     } catch (error) {
       console.error('[MainUIController] 加载墙体配置失败:', error);
     }

+ 38 - 11
assets/scripts/FourUI/ShopSystem/ShopController.ts

@@ -4,6 +4,7 @@ import EventBus, { GameEvents } from '../../Core/EventBus';
 import { TopBarController } from '../TopBarController';
 import { MoneyAni } from '../../Animations/MoneyAni';
 import { AdManager } from '../../Ads/AdManager';
+import { BundleLoader } from '../../Core/BundleLoader';
 
 const { ccclass, property } = _decorator;
 
@@ -57,8 +58,7 @@ export class ShopController extends Component {
     @property(Label)
     diamondAmountLabel: Label = null;
     
-    @property(JsonAsset)
-    shopConfigAsset: JsonAsset = null;
+    // @property(JsonAsset) shopConfigAsset: JsonAsset = null;  // 已改为动态加载
     
     @property(Node)
     billSpriteNode: Node = null;  // Canvas/ShopUI/ScrollView/view/content/bill/Sprite/Sprite
@@ -87,9 +87,9 @@ export class ShopController extends Component {
         return num.toString().split('').join(' ');
     }
     
-    onLoad() {
+    async onLoad() {
         this.saveDataManager = SaveDataManager.getInstance();
-        this.loadShopConfig();
+        await this.loadShopConfig();
         this.loadDailyRewardData();
         this.setupEventListeners();
     }
@@ -98,15 +98,42 @@ export class ShopController extends Component {
         this.updateUI();
     }
     
-    private loadShopConfig() {
-        if (this.shopConfigAsset) {
-            this.shopConfig = this.shopConfigAsset.json as ShopConfig;
-            console.log('[ShopController] shop.json加载成功:', this.shopConfig);
-            this.updateUI();
-        } else {
-            console.error('[ShopController] shopConfigAsset未设置,请在编辑器中拖拽shop.json文件到shopConfigAsset属性');
+    private async loadShopConfig() {
+        try {
+            const shopDataAsset = await BundleLoader.getInstance().loadDataJson('shop');
+            if (shopDataAsset && shopDataAsset.json) {
+                this.shopConfig = shopDataAsset.json as ShopConfig;
+                console.log('[ShopController] shop.json加载成功:', this.shopConfig);
+                this.updateUI();
+            } else {
+                console.warn('[ShopController] shop.json加载失败,使用默认配置');
+                this.useDefaultConfig();
+            }
+        } catch (error) {
+            console.error('[ShopController] 加载shop.json时出错:', error);
+            this.useDefaultConfig();
         }
     }
+
+    /**
+     * 使用默认商店配置
+     */
+    private useDefaultConfig() {
+        this.shopConfig = {
+            dailyRewards: {
+                money: {
+                    rewards: [100, 200, 300, 400, 500],
+                    maxClaimsPerDay: 5
+                },
+                diamond: {
+                    rewards: [10, 20, 30, 40, 50],
+                    maxClaimsPerDay: 5
+                }
+            }
+        };
+        console.log('[ShopController] 使用默认商店配置:', this.shopConfig);
+        this.updateUI();
+    }
     
     private loadDailyRewardData() {
         const savedData = localStorage.getItem(this.DAILY_REWARD_KEY);