181404010226 5 hónapja
szülő
commit
4f6f98c94c

+ 24 - 10
assets/Scenes/GameLevel.scene

@@ -22,7 +22,9 @@
     ],
     "_active": true,
     "_components": [],
-    "_prefab": null,
+    "_prefab": {
+      "__id__": 1153
+    },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -52,7 +54,7 @@
     },
     "autoReleaseAssets": false,
     "_globals": {
-      "__id__": 1153
+      "__id__": 1154
     },
     "_id": "29694223-a59c-44b3-acb0-80ab92d103f5"
   },
@@ -15468,6 +15470,10 @@
       "__uuid__": "54638943-4461-43b1-b351-a0380e1f30ce",
       "__expectedType__": "cc.Prefab"
     },
+    "bulletContainerPrefab": {
+      "__uuid__": "b67bcc20-b46f-4cd9-9020-820246f608d6",
+      "__expectedType__": "cc.Prefab"
+    },
     "_id": "0cvo12lc9PxoJ9je3jXcdb"
   },
   {
@@ -43485,31 +43491,39 @@
     "debugDraw": true,
     "_id": "ffMig9DF9DQLd2SVeZA893"
   },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": null,
+    "asset": null,
+    "fileId": "29694223-a59c-44b3-acb0-80ab92d103f5",
+    "instance": null,
+    "targetOverrides": null
+  },
   {
     "__type__": "cc.SceneGlobals",
     "ambient": {
-      "__id__": 1154
+      "__id__": 1155
     },
     "shadows": {
-      "__id__": 1155
+      "__id__": 1156
     },
     "_skybox": {
-      "__id__": 1156
+      "__id__": 1157
     },
     "fog": {
-      "__id__": 1157
+      "__id__": 1158
     },
     "octree": {
-      "__id__": 1158
+      "__id__": 1159
     },
     "skin": {
-      "__id__": 1159
+      "__id__": 1160
     },
     "lightProbeInfo": {
-      "__id__": 1160
+      "__id__": 1161
     },
     "postSettings": {
-      "__id__": 1161
+      "__id__": 1162
     },
     "bakedWithStationaryMainLight": false,
     "bakedWithHighpLightmap": false

+ 126 - 492
assets/Scenes/TestScene.scene

@@ -23,7 +23,7 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 21
+      "__id__": 16
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -54,7 +54,7 @@
     },
     "autoReleaseAssets": false,
     "_globals": {
-      "__id__": 22
+      "__id__": 17
     },
     "_id": "8a125a67-dbc5-4c64-b398-6a616deee4aa"
   },
@@ -71,19 +71,19 @@
         "__id__": 3
       },
       {
-        "__id__": 16
+        "__id__": 5
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 18
+        "__id__": 13
       },
       {
-        "__id__": 19
+        "__id__": 14
       },
       {
-        "__id__": 20
+        "__id__": 15
       }
     ],
     "_prefab": null,
@@ -118,138 +118,25 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "WeaponBlock",
+    "_name": "Camera",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 2
     },
-    "_children": [
-      {
-        "__id__": 4
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 11
-      },
-      {
-        "__id__": 12
-      },
-      {
-        "__id__": 13
-      },
-      {
-        "__id__": 14
-      },
-      {
-        "__id__": 15
-      }
-    ],
-    "_prefab": null,
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": -6.766,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": "79zHrTWPJP87Q/Ow+2pmvl"
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "B1",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 3
-    },
-    "_children": [
-      {
-        "__id__": 5
-      },
-      {
-        "__id__": 7
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 10
-      }
-    ],
-    "_prefab": null,
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 27.912,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": "59H3YpHHJIsrmeBtM9e5Qz"
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "(0,-1)",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 4
-    },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 6
+        "__id__": 4
       }
     ],
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -58.18700000000001,
-      "z": 0
+      "y": 0,
+      "z": 1000
     },
     "_lrot": {
       "__type__": "cc.Quat",
@@ -265,429 +152,171 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": "95fu6qpq1C5LaqrUrB/HHO"
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 5
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 48,
-      "height": 48
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": "13JoufCTVCF7q/oxsrGdmn"
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "Weapon",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 4
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 8
-      },
-      {
-        "__id__": 9
-      }
-    ],
-    "_prefab": null,
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": -0.15300000000002,
-      "y": -31.72199999999998,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 0.5,
-      "y": 0.5,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
+    "_layer": 1073741824,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
       "z": 0
     },
-    "_id": "eevVLyCRRKkpEMJFXBVYNA"
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 7
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 69,
-      "height": 118
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": "dfB97US6RMM73LJ+s64fT7"
+    "_id": "ebFwiq8gBFaYpqYbdoDODe"
   },
   {
-    "__type__": "cc.Sprite",
+    "__type__": "cc.Camera",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 7
+      "__id__": 3
     },
     "_enabled": true,
     "__prefab": null,
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
+    "_projection": 0,
+    "_priority": 0,
+    "_fov": 45,
+    "_fovAxis": 0,
+    "_orthoHeight": 667,
+    "_near": 0,
+    "_far": 2000,
     "_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 0,
+      "g": 0,
+      "b": 0,
       "a": 255
     },
-    "_spriteFrame": {
-      "__uuid__": "7efa8afb-730c-43f8-9d0a-5cbf71082a54@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_type": 0,
-    "_fillType": 0,
-    "_sizeMode": 1,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
+    "_depth": 1,
+    "_stencil": 0,
+    "_clearFlags": 7,
+    "_rect": {
+      "__type__": "cc.Rect",
       "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": "b1fVbwMr1Df7jr+Dc3hoTy"
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 4
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 48,
-      "height": 48
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
+      "y": 0,
+      "width": 1,
+      "height": 1
     },
-    "_id": "1dXPxqWrpE9LMg0QR64CNt"
+    "_aperture": 19,
+    "_shutter": 7,
+    "_iso": 0,
+    "_screenScale": 1,
+    "_visibility": 1108344832,
+    "_targetTexture": null,
+    "_postProcess": null,
+    "_usePostProcess": false,
+    "_cameraType": -1,
+    "_trackingType": 0,
+    "_id": "63WIch3o5BEYRlXzTT0oWc"
   },
   {
-    "__type__": "cc.UITransform",
-    "_name": "",
+    "__type__": "cc.Node",
     "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 3
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 52,
-      "height": 104
+    "_parent": {
+      "__id__": 2
     },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
+    "_prefab": {
+      "__id__": 6
     },
-    "_id": "21f8ef/q1BxoI/vee/Yp/Q"
+    "__editorExtras__": {}
   },
   {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 3
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 5
     },
-    "_enabled": true,
-    "__prefab": null,
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
+    "asset": {
+      "__uuid__": "425d97ad-14a3-4092-ac74-6ada1ee28fa9",
+      "__expectedType__": "cc.Prefab"
     },
-    "_spriteFrame": {
-      "__uuid__": "b0f7df3c-1a5b-4911-aba8-60347c843197@f9941",
-      "__expectedType__": "cc.SpriteFrame"
+    "fileId": "2fgmWEQyhIGr02gKDR/YNr",
+    "instance": {
+      "__id__": 7
     },
-    "_type": 0,
-    "_fillType": 0,
-    "_sizeMode": 1,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": "f2l1F+oVtLooQ6Fzqg+7tc"
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
   },
   {
-    "__type__": "cc.PolygonCollider2D",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 3
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "tag": 2,
-    "_group": 4,
-    "_density": 1,
-    "_sensor": false,
-    "_friction": 0.2,
-    "_restitution": 1,
-    "_offset": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_points": [
-      {
-        "__type__": "cc.Vec2",
-        "x": -19,
-        "y": 52
-      },
+    "__type__": "cc.PrefabInstance",
+    "fileId": "50ay3Dg9NOLqQ1/lYJy8vF",
+    "prefabRootNode": null,
+    "mountedChildren": [],
+    "mountedComponents": [],
+    "propertyOverrides": [
       {
-        "__type__": "cc.Vec2",
-        "x": -26,
-        "y": 45
-      },
-      {
-        "__type__": "cc.Vec2",
-        "x": -26,
-        "y": -45
-      },
-      {
-        "__type__": "cc.Vec2",
-        "x": -19,
-        "y": -52
-      },
-      {
-        "__type__": "cc.Vec2",
-        "x": 19,
-        "y": -52
+        "__id__": 8
       },
       {
-        "__type__": "cc.Vec2",
-        "x": 26,
-        "y": -45
+        "__id__": 10
       },
       {
-        "__type__": "cc.Vec2",
-        "x": 26,
-        "y": 45
+        "__id__": 11
       },
       {
-        "__type__": "cc.Vec2",
-        "x": 19,
-        "y": 52
+        "__id__": 12
       }
     ],
-    "_id": "28tKT0+LZMHYqZoUwfuSrz"
+    "removedComponents": []
   },
   {
-    "__type__": "cc.RigidBody2D",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 3
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "enabledContactListener": true,
-    "bullet": false,
-    "awakeOnLoad": true,
-    "_group": 4,
-    "_type": 1,
-    "_allowSleep": true,
-    "_gravityScale": 0,
-    "_linearDamping": 0,
-    "_angularDamping": 0,
-    "_linearVelocity": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 9
     },
-    "_angularVelocity": 0,
-    "_fixedRotation": false,
-    "_id": "abKWZnmoZIfJ3EmOj9pydS"
+    "propertyPath": [
+      "_name"
+    ],
+    "value": "WeaponBlock"
   },
   {
-    "__type__": "e2fb10lUiVLvaLrttZW1KXR",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 3
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "pelletPrefab": {
-      "__uuid__": "54638943-4461-43b1-b351-a0380e1f30ce",
-      "__expectedType__": "cc.Prefab"
-    },
-    "fireInterval": 1,
-    "_id": "c1NzDNJvNJyK+IfeaT48Of"
+    "__type__": "cc.TargetInfo",
+    "localID": [
+      "2fgmWEQyhIGr02gKDR/YNr"
+    ]
   },
   {
-    "__type__": "cc.Node",
-    "_name": "Camera",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 2
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 9
     },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 17
-      }
+    "propertyPath": [
+      "_lpos"
     ],
-    "_prefab": null,
-    "_lpos": {
+    "value": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 0,
-      "z": 1000
+      "y": -6.766,
+      "z": 0
+    }
+  },
+  {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 9
     },
-    "_lrot": {
+    "propertyPath": [
+      "_lrot"
+    ],
+    "value": {
       "__type__": "cc.Quat",
       "x": 0,
       "y": 0,
       "z": 0,
       "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 1073741824,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": "ebFwiq8gBFaYpqYbdoDODe"
+    }
   },
   {
-    "__type__": "cc.Camera",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 16
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 9
     },
-    "_enabled": true,
-    "__prefab": null,
-    "_projection": 0,
-    "_priority": 0,
-    "_fov": 45,
-    "_fovAxis": 0,
-    "_orthoHeight": 667,
-    "_near": 0,
-    "_far": 2000,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_depth": 1,
-    "_stencil": 0,
-    "_clearFlags": 7,
-    "_rect": {
-      "__type__": "cc.Rect",
+    "propertyPath": [
+      "_euler"
+    ],
+    "value": {
+      "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "width": 1,
-      "height": 1
-    },
-    "_aperture": 19,
-    "_shutter": 7,
-    "_iso": 0,
-    "_screenScale": 1,
-    "_visibility": 1108344832,
-    "_targetTexture": null,
-    "_postProcess": null,
-    "_usePostProcess": false,
-    "_cameraType": -1,
-    "_trackingType": 0,
-    "_id": "63WIch3o5BEYRlXzTT0oWc"
+      "z": 0
+    }
   },
   {
     "__type__": "cc.UITransform",
@@ -722,7 +351,7 @@
     "_enabled": true,
     "__prefab": null,
     "_cameraComponent": {
-      "__id__": 17
+      "__id__": 4
     },
     "_alignCanvasWithScreen": true,
     "_id": "12O/ljcVlEqLmVm3U2gEOQ"
@@ -763,33 +392,38 @@
     "asset": null,
     "fileId": "8a125a67-dbc5-4c64-b398-6a616deee4aa",
     "instance": null,
-    "targetOverrides": null
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": [
+      {
+        "__id__": 5
+      }
+    ]
   },
   {
     "__type__": "cc.SceneGlobals",
     "ambient": {
-      "__id__": 23
+      "__id__": 18
     },
     "shadows": {
-      "__id__": 24
+      "__id__": 19
     },
     "_skybox": {
-      "__id__": 25
+      "__id__": 20
     },
     "fog": {
-      "__id__": 26
+      "__id__": 21
     },
     "octree": {
-      "__id__": 27
+      "__id__": 22
     },
     "skin": {
-      "__id__": 28
+      "__id__": 23
     },
     "lightProbeInfo": {
-      "__id__": 29
+      "__id__": 24
     },
     "postSettings": {
-      "__id__": 30
+      "__id__": 25
     },
     "bakedWithStationaryMainLight": false,
     "bakedWithHighpLightmap": false

+ 488 - 0
assets/assets/Prefabs/PelletContainer.prefab

@@ -0,0 +1,488 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "PelletContainer",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "persistent": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "PelletContainer",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 10
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 16
+      },
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_prefab": {
+      "__id__": 22
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 9.688,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 0.5,
+      "y": 0.5,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Pellet",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 0.5,
+      "y": 0.5,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 4
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 114,
+      "height": 114
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "4cFfiGSRRNBJ6HQnvWhKN6"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 6
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": null,
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "5eXYZPbTFA2p6UgLI/X6fq"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 8
+    },
+    "_alignFlags": 45,
+    "_target": null,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 57,
+    "_originalHeight": 57,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "bfDZg19Z9MxpgN2U0Lsusr"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "b1luMUWcFJmqi7I1A/cZXE",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "TrailEffect",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 11
+      },
+      {
+        "__id__": 13
+      }
+    ],
+    "_prefab": {
+      "__id__": 15
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -92.176,
+      "y": -5.938,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0.7071067811865476,
+      "w": -0.7071067811865475
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 1073741824,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 270
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 12
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 72.06999969482422,
+      "height": 175.0399932861328
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.630914408397987,
+      "y": 0.5104547640610523
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "56KO0APYtKRrRSDUqPjZT4"
+  },
+  {
+    "__type__": "sp.Skeleton",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 14
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_skeletonData": {
+      "__uuid__": "03e20616-4f08-4682-848d-7b9e8e27af35",
+      "__expectedType__": "sp.SkeletonData"
+    },
+    "defaultSkin": "default",
+    "defaultAnimation": "<None>",
+    "_premultipliedAlpha": true,
+    "_timeScale": 1,
+    "_preCacheMode": 0,
+    "_cacheMode": 0,
+    "_sockets": [],
+    "_useTint": false,
+    "_debugMesh": false,
+    "_debugBones": false,
+    "_debugSlots": false,
+    "_enableBatch": false,
+    "loop": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "2buPpbG2ZO06BJlQOG5/cL"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "e4cE95pldB5qMiM5U9zRCY",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 17
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 57,
+      "height": 57
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "01PFH40wdI/5w0W4w5nM/4"
+  },
+  {
+    "__type__": "cc.RigidBody2D",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 19
+    },
+    "enabledContactListener": true,
+    "bullet": true,
+    "awakeOnLoad": true,
+    "_group": 8,
+    "_type": 2,
+    "_allowSleep": false,
+    "_gravityScale": 0,
+    "_linearDamping": 0,
+    "_angularDamping": 0,
+    "_linearVelocity": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_angularVelocity": 0,
+    "_fixedRotation": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "37zBafaaVBPKJGfhjp2CA5"
+  },
+  {
+    "__type__": "cc.BoxCollider2D",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 21
+    },
+    "tag": 3,
+    "_group": 8,
+    "_density": 1,
+    "_sensor": false,
+    "_friction": 0.2,
+    "_restitution": 0,
+    "_offset": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_size": {
+      "__type__": "cc.Size",
+      "width": 57,
+      "height": 57
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "f6qdCY1HlJnrlAGAQlEG80"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "ecZuuI1ixD85bubQwhroh8",
+    "instance": null,
+    "targetOverrides": null
+  }
+]

+ 13 - 0
assets/assets/Prefabs/PelletContainer.prefab.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.50",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "b67bcc20-b46f-4cd9-9020-820246f608d6",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {
+    "syncNodeName": "PelletContainer"
+  }
+}

+ 146 - 0
assets/assets/Prefabs/TrailEffect.prefab

@@ -0,0 +1,146 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "TrailEffect",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "persistent": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "TrailEffect",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": null,
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 6
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 152.7896961479185,
+      "y": -206.03174942494672,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 1,
+      "w": 6.123233995736766e-17
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 1073741824,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 180
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 3
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 72.06999969482422,
+      "height": 175.0399932861328
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.630914408397987,
+      "y": 0.5104547640610523
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "b2ORjFD7NLPJnNCvtp+WHY"
+  },
+  {
+    "__type__": "sp.Skeleton",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 5
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_skeletonData": {
+      "__uuid__": "03e20616-4f08-4682-848d-7b9e8e27af35",
+      "__expectedType__": "sp.SkeletonData"
+    },
+    "defaultSkin": "default",
+    "defaultAnimation": "",
+    "_premultipliedAlpha": true,
+    "_timeScale": 1,
+    "_preCacheMode": 0,
+    "_cacheMode": 0,
+    "_sockets": [],
+    "_useTint": false,
+    "_debugMesh": false,
+    "_debugBones": false,
+    "_debugSlots": false,
+    "_enableBatch": false,
+    "loop": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "89GevWw75DH5vNWruxef6k"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "c0VG1uiDFIT7TYxrWYFB7q",
+    "targetOverrides": null
+  }
+]

+ 13 - 0
assets/assets/Prefabs/TrailEffect.prefab.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.50",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "94aece57-f0de-4383-bf9e-cdd8636a5ca3",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {
+    "syncNodeName": "TrailEffect"
+  }
+}

+ 7 - 7
assets/resources/data/weapons.json

@@ -111,7 +111,7 @@
         },
         "visual": {
           "bulletPrefab": "bullets/CarrotBullet",
-          "hitEffect": "Animation/WeaponTx/tx0001/tx0001",
+          "hitEffect": "",
           "trailEffect": "Animation/WeaponTx/tx0001/tx0001",
           "muzzleFlash": "Animation/WeaponTx/tx0001/tx0001"
         }
@@ -184,7 +184,7 @@
         "visual": {
           "bulletPrefab": "bullets/SawBullet",
           "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
-          "trailEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": null,
           "muzzleFlash": "Animation/WeaponTx/tx0002/tx0002"
         }
       },
@@ -248,7 +248,7 @@
         "visual": {
           "bulletPrefab": "bullets/WatermelonBomb",
           "hitEffect": "Animation/WeaponTx/tx0007/tx0007",
-          "trailEffect": "Animation/WeaponTx/tx0007/tx0007",
+          "trailEffect": null,
           "muzzleFlash": "Animation/WeaponTx/tx0007/tx0007"
         }
       },
@@ -311,7 +311,7 @@
         "visual": {
           "bulletPrefab": "bullets/BoomerangBullet",
           "hitEffect": "Animation/WeaponTx/tx0003/tx0003",
-          "trailEffect": "Animation/WeaponTx/tx0003/tx0003",
+          "trailEffect": null,
           "muzzleFlash": "Animation/WeaponTx/tx0003/tx0003"
         }
       },
@@ -386,7 +386,7 @@
         "visual": {
           "bulletPrefab": "bullets/PepperBomb",
           "hitEffect": "Animation/WeaponTx/tx0005/tx0005",
-          "trailEffect": "Animation/WeaponTx/tx0005/tx0005",
+          "trailEffect": null,
           "burnEffect": "Animation/WeaponTx/tx0005/tx0005",
           "muzzleFlash": "Animation/WeaponTx/tx0005/tx0005"
         }
@@ -450,7 +450,7 @@
         "visual": {
           "bulletPrefab": "bullets/CactusBullet",
           "hitEffect": "Animation/WeaponTx/tx0005/tx0005",
-          "trailEffect": "Animation/WeaponTx/tx0005/tx0005",
+          "trailEffect": null,
           "muzzleFlash": "Animation/WeaponTx/tx0005/tx0005"
         }
       },
@@ -514,7 +514,7 @@
         "visual": {
           "bulletPrefab": "bullets/OkraMissile",
           "hitEffect": "Animation/WeaponTx/tx0006/tx0006",
-          "trailEffect": "Animation/WeaponTx/tx0006/tx0006",
+          "trailEffect": null,
           "muzzleFlash": "Animation/WeaponTx/tx0006/tx0006"
         }
       },

+ 16 - 2
assets/scripts/CombatSystem/BallController.ts

@@ -61,6 +61,13 @@ export class BallController extends Component {
     private blockFireCooldown: Map<string, number> = new Map();
     private FIRE_COOLDOWN = 0.05;
 
+    // 带尾部特效的子弹容器预制体
+    @property({
+        type: Prefab,
+        tooltip: '拖拽带尾部特效的子弹容器预制体到这里(例如 PelletContainer)'
+    })
+    public bulletContainerPrefab: Prefab = null;
+
     start() {
         // 如果没有指定placedBlocksContainer,尝试找到它
         if (!this.placedBlocksContainer) {
@@ -588,15 +595,22 @@ export class BallController extends Component {
                 return;
             }
 
+            // === 根据武器配置选择合适的预制体 ===
+            const needsTrail = !!(finalConfig.bulletConfig?.visual?.trailEffect);
+            const prefabToUse: Prefab = (needsTrail && this.bulletContainerPrefab) ? this.bulletContainerPrefab : this.bulletPrefab;
+            if (!prefabToUse) {
+                return; // 如果没有可用的预制体则直接退出
+            }
+
             if (isMultiShot) {
                 // 使用批量创建逻辑
-                const bullets = WeaponBullet.createBullets(initData, this.bulletPrefab as any);
+                const bullets = WeaponBullet.createBullets(initData, prefabToUse as any);
                 bullets.forEach(b => {
                     gameArea.addChild(b);
                 });
             } else {
                 // 单发逻辑(沿用原流程)
-                const bullet = instantiate(this.bulletPrefab);
+                const bullet = instantiate(prefabToUse);
                 if (!bullet) {
                     return;
                 }

+ 21 - 0
assets/scripts/CombatSystem/WeaponBullet.ts

@@ -241,6 +241,13 @@ export class WeaponBullet extends Component {
         // 计算方向
         const direction = initData.direction || this.calculateDirection(initData.autoTarget);
         
+        // === 根据发射方向调整容器朝向(仅首次,后续不再旋转) ===
+        if (direction) {
+            // 角度 = atan2(y,x),转成度数
+            const deg = math.toDegree(Math.atan2(direction.y, direction.x));
+            this.node.angle = deg;
+        }
+        
         this.bulletTrajectory.init(
             trajCfg,
             direction,
@@ -290,6 +297,11 @@ export class WeaponBullet extends Component {
             rigidBody.linearDamping = 0;
             rigidBody.angularDamping = 0;
             rigidBody.allowSleep = false;
+            
+            // 如果节点包含子节点 'Pellet',表示这是带容器的子弹;锁定容器旋转
+            if (this.node.getChildByName('Pellet')) {
+                rigidBody.fixedRotation = true;
+            }
         }
         
         const collider = this.getComponent(Collider2D);
@@ -374,6 +386,15 @@ export class WeaponBullet extends Component {
      * 为子弹设置持续旋转(通过刚体角速度,避免被物理系统覆盖)
      */
     private applyAutoRotation() {
+        // 若存在子节点 Pellet,则只旋转 Pellet,容器保持角度不变
+        const pelletNode = this.node.getChildByName('Pellet');
+        if (pelletNode) {
+            this.schedule((dt: number) => {
+                pelletNode.angle += this._rotationSpeedDeg * dt;
+            }, 0);
+            return;
+        }
+
         const rigidBody = this.getComponent(RigidBody2D);
         if (rigidBody) {
             rigidBody.angularVelocity = this._rotationSpeedRad; // 弧度/秒