Jelajahi Sumber

修改bug

修改bug
Kziwws 2 hari lalu
induk
melakukan
f7ac2d2f8a

File diff ditekan karena terlalu besar
+ 1668 - 244
assets/prefabs/map/map2.prefab


+ 9 - 9
assets/prefabs/ui/gunfightShootUI.prefab

@@ -893,7 +893,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -240,
+      "x": -260,
       "y": 0,
       "z": 0
     },
@@ -953,8 +953,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 3.971,
-      "y": 3.971,
+      "x": 0,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -1983,7 +1983,7 @@
     "node": {
       "__id__": 31
     },
-    "_enabled": false,
+    "_enabled": true,
     "__prefab": {
       "__id__": 79
     },
@@ -2078,7 +2078,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 480,
+      "width": 520,
       "height": 200
     },
     "_anchorPoint": {
@@ -2225,7 +2225,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 480,
+      "width": 520,
       "height": 200
     },
     "_anchorPoint": {
@@ -2296,10 +2296,10 @@
     "__prefab": {
       "__id__": 97
     },
-    "_alignFlags": 40,
+    "_alignFlags": 0,
     "_target": null,
-    "_left": 0.2,
-    "_right": 0.2,
+    "_left": 0.1527777777777778,
+    "_right": 0.1527777777777778,
     "_top": 0,
     "_bottom": 200.05900000000003,
     "_horizontalCenter": 0,

+ 175 - 136
assets/prefabs/ui/obtainUI.prefab

@@ -27,9 +27,6 @@
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 102
-      },
       {
         "__id__": 104
       },
@@ -38,10 +35,13 @@
       },
       {
         "__id__": 108
+      },
+      {
+        "__id__": 110
       }
     ],
     "_prefab": {
-      "__id__": 110
+      "__id__": 112
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -263,40 +263,40 @@
         "__id__": 21
       },
       {
-        "__id__": 37
+        "__id__": 39
       },
       {
-        "__id__": 43
+        "__id__": 45
       },
       {
-        "__id__": 49
+        "__id__": 51
       },
       {
-        "__id__": 73
+        "__id__": 75
       },
       {
-        "__id__": 89
+        "__id__": 91
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 95
-      },
       {
         "__id__": 97
       },
       {
         "__id__": 99
+      },
+      {
+        "__id__": 101
       }
     ],
     "_prefab": {
-      "__id__": 101
+      "__id__": 103
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 159.23899999999998,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -351,8 +351,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 275.845,
-      "y": 376.41600000000005,
+      "x": 226.34500000000003,
+      "y": 290.4159999999998,
       "z": 0
     },
     "_lrot": {
@@ -573,9 +573,6 @@
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 28
-      },
       {
         "__id__": 30
       },
@@ -584,15 +581,18 @@
       },
       {
         "__id__": 34
+      },
+      {
+        "__id__": 36
       }
     ],
     "_prefab": {
-      "__id__": 36
+      "__id__": 38
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 346.139,
+      "y": 260.13899999999984,
       "z": 0
     },
     "_lrot": {
@@ -634,15 +634,18 @@
       },
       {
         "__id__": 25
+      },
+      {
+        "__id__": 27
       }
     ],
     "_prefab": {
-      "__id__": 27
+      "__id__": 29
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -57.607399999999984,
+      "y": -50.199999999999996,
       "z": 0
     },
     "_lrot": {
@@ -682,8 +685,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 471.0018310546875,
-      "height": 115.21479999999997
+      "width": 369,
+      "height": 90.39999999999999
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -721,10 +724,10 @@
     "_string": "New weapon\nhas been unlocked!",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 50.98,
-    "_fontSize": 50.98,
+    "_actualFontSize": 40,
+    "_fontSize": 40,
     "_fontFamily": "Arial",
-    "_lineHeight": 50.98,
+    "_lineHeight": 40,
     "_overflow": 3,
     "_enableWrapText": true,
     "_font": {
@@ -767,6 +770,42 @@
     "__type__": "cc.CompPrefabInfo",
     "fileId": "5e7115S/xFeJ/kE53pEnkF"
   },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 28
+    },
+    "_alignFlags": 40,
+    "_target": null,
+    "_left": 10,
+    "_right": 10,
+    "_top": 0,
+    "_bottom": 0,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 369,
+    "_originalHeight": 0,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "23uf2UL3JCto7fmMmy9zry"
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -790,12 +829,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 29
+      "__id__": 31
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 488,
-      "height": 115.21479999999997
+      "width": 389,
+      "height": 100.39999999999999
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -818,7 +857,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 31
+      "__id__": 33
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -863,7 +902,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 33
+      "__id__": 35
     },
     "_alignFlags": 41,
     "_target": null,
@@ -899,7 +938,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 35
+      "__id__": 37
     },
     "_resizeMode": 1,
     "_layoutType": 2,
@@ -909,23 +948,23 @@
       "height": 40
     },
     "_startAxis": 0,
-    "_paddingLeft": 20,
-    "_paddingRight": 20,
-    "_paddingTop": 0,
-    "_paddingBottom": 0,
+    "_paddingLeft": 0,
+    "_paddingRight": 0,
+    "_paddingTop": 5,
+    "_paddingBottom": 5,
     "_spacingX": 0,
     "_spacingY": 0,
     "_verticalDirection": 1,
     "_horizontalDirection": 0,
     "_constraint": 0,
     "_constraintNum": 2,
-    "_affectedByScale": false,
+    "_affectedByScale": true,
     "_isAlign": true,
     "_id": ""
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "54lTIJFodG1oO7ZqNCPRuw"
+    "fileId": "36HJX8ImFB2bRkltLl5b0u"
   },
   {
     "__type__": "cc.PrefabInfo",
@@ -952,14 +991,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 38
+        "__id__": 40
       },
       {
-        "__id__": 40
+        "__id__": 42
       }
     ],
     "_prefab": {
-      "__id__": 42
+      "__id__": 44
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -996,11 +1035,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 37
+      "__id__": 39
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 39
+      "__id__": 41
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1024,11 +1063,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 37
+      "__id__": 39
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 41
+      "__id__": 43
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1088,14 +1127,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 44
+        "__id__": 46
       },
       {
-        "__id__": 46
+        "__id__": 48
       }
     ],
     "_prefab": {
-      "__id__": 48
+      "__id__": 50
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1132,11 +1171,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 43
+      "__id__": 45
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 45
+      "__id__": 47
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1160,11 +1199,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 43
+      "__id__": 45
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 47
+      "__id__": 49
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1222,26 +1261,26 @@
     },
     "_children": [
       {
-        "__id__": 50
+        "__id__": 52
       },
       {
-        "__id__": 60
+        "__id__": 62
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 66
-      },
       {
         "__id__": 68
       },
       {
         "__id__": 70
+      },
+      {
+        "__id__": 72
       }
     ],
     "_prefab": {
-      "__id__": 72
+      "__id__": 74
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1278,21 +1317,21 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 49
+      "__id__": 51
     },
     "_children": [
       {
-        "__id__": 51
+        "__id__": 53
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 57
+        "__id__": 59
       }
     ],
     "_prefab": {
-      "__id__": 59
+      "__id__": 61
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1329,20 +1368,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 50
+      "__id__": 52
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 52
+        "__id__": 54
       },
       {
-        "__id__": 54
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 56
+      "__id__": 58
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1379,11 +1418,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 51
+      "__id__": 53
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 53
+      "__id__": 55
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1407,11 +1446,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 51
+      "__id__": 53
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 55
+      "__id__": 57
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1465,11 +1504,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 50
+      "__id__": 52
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 58
+      "__id__": 60
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1506,20 +1545,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 49
+      "__id__": 51
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 61
+        "__id__": 63
       },
       {
-        "__id__": 63
+        "__id__": 65
       }
     ],
     "_prefab": {
-      "__id__": 65
+      "__id__": 67
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1556,11 +1595,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 60
+      "__id__": 62
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 62
+      "__id__": 64
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1584,11 +1623,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 60
+      "__id__": 62
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 64
+      "__id__": 66
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1668,11 +1707,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 49
+      "__id__": 51
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 67
+      "__id__": 69
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1696,11 +1735,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 49
+      "__id__": 51
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 69
+      "__id__": 71
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1741,11 +1780,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 49
+      "__id__": 51
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 71
+      "__id__": 73
     },
     "_resizeMode": 1,
     "_layoutType": 1,
@@ -1796,14 +1835,11 @@
     },
     "_children": [
       {
-        "__id__": 74
+        "__id__": 76
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 80
-      },
       {
         "__id__": 82
       },
@@ -1812,15 +1848,18 @@
       },
       {
         "__id__": 86
+      },
+      {
+        "__id__": 88
       }
     ],
     "_prefab": {
-      "__id__": 88
+      "__id__": 90
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -492.6979999999999,
+      "y": -389.243,
       "z": 0
     },
     "_lrot": {
@@ -1852,20 +1891,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 73
+      "__id__": 75
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 75
+        "__id__": 77
       },
       {
-        "__id__": 77
+        "__id__": 79
       }
     ],
     "_prefab": {
-      "__id__": 79
+      "__id__": 81
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1902,11 +1941,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 74
+      "__id__": 76
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 76
+      "__id__": 78
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1930,11 +1969,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 74
+      "__id__": 76
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 78
+      "__id__": 80
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -2014,11 +2053,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 73
+      "__id__": 75
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 81
+      "__id__": 83
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2042,11 +2081,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 73
+      "__id__": 75
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 83
+      "__id__": 85
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -2087,20 +2126,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 73
+      "__id__": 75
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 85
+      "__id__": 87
     },
-    "_alignFlags": 33,
+    "_alignFlags": 18,
     "_target": null,
     "_left": 512.8399999999999,
-    "_right": 137,
-    "_top": 831.6980000000001,
+    "_right": 103.15300000000002,
+    "_top": 634.256,
     "_bottom": 0,
     "_horizontalCenter": 0,
-    "_verticalCenter": 0,
+    "_verticalCenter": -389.243,
     "_isAbsLeft": true,
     "_isAbsRight": true,
     "_isAbsTop": true,
@@ -2123,11 +2162,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 73
+      "__id__": 75
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 87
+      "__id__": 89
     },
     "clickEvents": [],
     "_interactable": true,
@@ -2167,7 +2206,7 @@
     "_duration": 0.1,
     "_zoomScale": 1.01,
     "_target": {
-      "__id__": 73
+      "__id__": 75
     },
     "_id": ""
   },
@@ -2200,14 +2239,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 90
+        "__id__": 92
       },
       {
-        "__id__": 92
+        "__id__": 94
       }
     ],
     "_prefab": {
-      "__id__": 94
+      "__id__": 96
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2244,11 +2283,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 89
+      "__id__": 91
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 91
+      "__id__": 93
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2272,11 +2311,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 89
+      "__id__": 91
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 93
+      "__id__": 95
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -2360,12 +2399,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 96
+      "__id__": 98
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 588,
-      "height": 773.0000000000003
+      "width": 489,
+      "height": 601
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2388,14 +2427,14 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 98
+      "__id__": 100
     },
-    "_alignFlags": 45,
+    "_alignFlags": 18,
     "_target": null,
-    "_left": 66,
-    "_right": 66,
-    "_top": 254.26099999999983,
-    "_bottom": 572.7389999999998,
+    "_left": 115.5,
+    "_right": 115.5,
+    "_top": 340.26099999999997,
+    "_bottom": 658.739,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,
@@ -2424,7 +2463,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 100
+      "__id__": 102
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -2482,7 +2521,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 103
+      "__id__": 105
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2510,7 +2549,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 105
+      "__id__": 107
     },
     "_alignFlags": 45,
     "_target": null,
@@ -2546,7 +2585,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 107
+      "__id__": 109
     },
     "_id": ""
   },
@@ -2564,7 +2603,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 109
+      "__id__": 111
     },
     "_id": ""
   },

+ 14 - 14
assets/scenes/game.scene

@@ -158,7 +158,7 @@
   {
     "__type__": "cc.Node",
     "_name": "GameMgr",
-    "_objFlags": 0,
+    "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 1
@@ -210,7 +210,7 @@
   {
     "__type__": "cc.Node",
     "_name": "map_pos",
-    "_objFlags": 0,
+    "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 4
@@ -309,7 +309,7 @@
         "__id__": 140
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
         "__id__": 143
@@ -2841,7 +2841,7 @@
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,
@@ -3163,7 +3163,7 @@
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
-    "_enableOutline": false,
+    "_enableOutline": true,
     "_outlineColor": {
       "__type__": "cc.Color",
       "r": 0,
@@ -4117,8 +4117,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -360.00000000000006,
-      "y": -219.633,
+      "x": -360,
+      "y": -150.209,
       "z": 0
     },
     "_lrot": {
@@ -4172,7 +4172,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 64,
-      "y": 86.809,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -4269,7 +4269,7 @@
     },
     "_enabled": true,
     "__prefab": null,
-    "_alignFlags": 9,
+    "_alignFlags": 10,
     "_target": null,
     "_left": 0,
     "_right": 0,
@@ -4566,7 +4566,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 652.5000000000001,
-      "y": 83.511,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -4663,7 +4663,7 @@
     },
     "_enabled": true,
     "__prefab": null,
-    "_alignFlags": 33,
+    "_alignFlags": 34,
     "_target": null,
     "_left": 13,
     "_right": 0,
@@ -4748,7 +4748,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720.0000000000001,
-      "height": 300
+      "height": 135
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4771,8 +4771,8 @@
     "_target": {
       "__id__": 13
     },
-    "_left": 0,
-    "_right": 0,
+    "_left": 5.684341886080802e-14,
+    "_right": -5.684341886080802e-14,
     "_top": 0,
     "_bottom": 0,
     "_horizontalCenter": 0,

+ 2 - 2
assets/scripts/data/UserData.ts

@@ -162,8 +162,8 @@ class UserData extends Singleton {
             let configData:any = Utils.clone(this.playerTable[0]);
             //查询玩家所有枪
             this._data = {
-                gold: 88880,//金币
-                diamond: 88880,//钻石
+                gold: 80000,//金币
+                diamond: 80000,//钻石
                 boomerang: 0,//飞镖个数
                 level: 1,//关卡等级
                 ...configData, //转化的基础配置数据

+ 79 - 32
assets/scripts/game/GMap.ts

@@ -1,20 +1,29 @@
-import { _decorator, easing, MeshRenderer, Node, tween, Vec3 } from 'cc';
+import { _decorator, easing, MeshRenderer, Node, rect, tween, Vec3 } from 'cc';
 import { BaseExp } from '../core/base/BaseExp';
 import { autoBind } from '../extend/AutoBind';
 import { Utils } from '../utils/Utils';
 const { ccclass, property } = _decorator;
 
+//坐标类
+export class MPos{
+    //位置坐标
+    public pos: Vec3 = Vec3.ZERO;
+    //该站立点是否已经有人在此站位了
+    public isVacancy: boolean = false;
+}
+
+
 //埋伏点接口类
 export class AmbushPoint {
     //埋伏点位置节点数组
-    public standPosArr: Vec3[] = [];
+    public standPosArr: MPos[] = [];
     //中间路径节点
-    public roadPosArr: Vec3[] = [];
+    public roadPosArr: MPos[] = [];
     //掩体点位置节点
-    public ambushPosArr: Vec3[] = [];
+    public ambushPosArr: MPos[] = [];
     //逃跑点位置节点
-    public escapePosArr: Vec3[] = [];
-    //是否已经有人在此站位了
+    public escapePosArr: MPos[] = [];
+    //改大的堆点是否已经遍历过
     public isVacancy: boolean = false;
 }
 
@@ -96,27 +105,49 @@ export class GMap extends BaseExp {
             .map(ambushNode => {
                 const point = new AmbushPoint();
                 point.isVacancy = false;
-                //从节点结构获取坐标配置
+                //转换为MPos类
                 point.standPosArr = ambushNode.children
                     .filter(e => e.name.startsWith('stand_'))
-                    .map(node => node.worldPosition.clone()); 
+                    .map(node => {
+                        let mpos = new MPos();
+                        mpos.pos = node.worldPosition.clone();
+                        mpos.isVacancy = false;
+                        return mpos;
+                    });
                 point.roadPosArr = ambushNode.children
                     .filter(e => e.name.startsWith('road_'))
                     .sort((a, b) => {
-                        //提取数字部分(兼容 road_1 / road_01 / road_001 等所有情况)
                         const getNumber = (name: string) => {
-                            const numPart = name.split('_').pop(); // 取最后一段
-                            return parseInt(numPart || '0', 10);   // 自动忽略前导零
+                            const numPart = name.split('_').pop();
+                            return parseInt(numPart || '0', 10);
                         };
-                        return getNumber(a.name) - getNumber(b.name); // 按数值升序
+                        return getNumber(a.name) - getNumber(b.name);
                     })
-                    .map(node => node.worldPosition.clone()); 
+                    .map(node => {
+                        let mpos = new MPos();
+                        mpos.pos = node.worldPosition.clone();
+                        mpos.isVacancy = false;
+                        return mpos;
+                    });
+                
                 point.ambushPosArr = ambushNode.children
-                    .filter(e => e.name.startsWith('bunker_')) 
-                    .map(node => node.worldPosition.clone()); 
+                    .filter(e => e.name.startsWith('bunker_'))
+                    .map(node => {
+                        let mpos = new MPos();
+                        mpos.pos = node.worldPosition.clone();
+                        mpos.isVacancy = false;
+                        return mpos;
+                    });
+                
                 point.escapePosArr = ambushNode.children
-                    .filter(e => e.name.startsWith('escape_')) 
-                    .map(node => node.worldPosition.clone()); 
+                    .filter(e => e.name.startsWith('escape_'))
+                    .map(node => {
+                        let mpos = new MPos();
+                        mpos.pos = node.worldPosition.clone();
+                        mpos.isVacancy = false;
+                        return mpos;
+                    });
+                
                 return point;
             });
     }
@@ -140,11 +171,9 @@ export class GMap extends BaseExp {
         ambush.isVacancy = true;
         eData.ambush = ambush;
         //查找中间路径点
-        paths = paths.concat(ambush.roadPosArr);
+        paths = paths.concat(ambush.roadPosArr.map(mpos => mpos.pos));
         //随机一个站立点到最后坐标
-        const endPos:Vec3 = Utils.randomArray(ambush.standPosArr)[0];
-        endPos.x += Utils.getRandomFloat(0,0.35);
-        paths.push(endPos);
+        paths.push(this.getStandPos(ambush.standPosArr));
         //测试时使用
         /*paths.forEach(e => {
             console.log("FFFFFF = " + this.node.getComponent(UITransform).convertToNodeSpaceAR(e));
@@ -153,7 +182,27 @@ export class GMap extends BaseExp {
     }
 
     /**
-     * 得到一个站位点
+     * 得到一个敌人的站位点
+     */
+    private getStandPos(standPosArr: MPos[]): Vec3 {
+        if(standPosArr.length <= 0){
+           return Vec3.ZERO;
+        }else{
+            //获取所有可用的站位点(未被占用的)
+            const availablePoints = standPosArr.filter(p => !p.isVacancy);
+            //随机返回一个可用站位点 当所有点位都被占用时,随机返回任意一个
+            let isAddRandom: boolean = availablePoints.length <= 0;
+            let points: MPos[] = availablePoints.length > 0 ? availablePoints : standPosArr;
+            let pos: Vec3 = Utils.randomArray(points)[0].pos;
+            if(isAddRandom){
+                pos.x += Utils.getRandomFloat(-0.3,0.3);
+            }
+            return pos;
+        }
+    }
+
+    /**
+     * 得到一个堆点类
      */
     private getAmbushClas(){
         if(!this.ambushPoints 
@@ -163,15 +212,9 @@ export class GMap extends BaseExp {
         }
         //获取所有可用的埋伏点(未被占用的)
         const availablePoints = this.ambushPoints.filter(p => !p.isVacancy);
-        if (availablePoints.length > 0) {
-            //随机返回一个可用埋伏点
-            return Utils.randomArray(availablePoints)[0];
-        }
-        //当所有点位都被占用时,随机返回任意一个
-        if(this.ambushPoints.length > 0) {
-            return Utils.randomArray(this.ambushPoints)[0];
-        }
-        return null;
+        //随机返回一个可用埋伏点 当所有点位都被占用时,随机返回任意一个
+        let points: AmbushPoint[] = availablePoints.length > 0 ? availablePoints : this.ambushPoints;
+        return Utils.randomArray(points)[0];
     }
 
     /**
@@ -224,8 +267,12 @@ export class GMap extends BaseExp {
      * 还原数据
      */
     public resetData(){
-        this.ambushPoints.forEach(e => {
+        this.ambushPoints.forEach((e: AmbushPoint) => {
             e.isVacancy = false;
+            e.standPosArr.forEach((a: MPos) => a.isVacancy = false);
+            e.roadPosArr.forEach((b: MPos) => b.isVacancy = false);
+            e.ambushPosArr.forEach((c: MPos) => c.isVacancy = false);
+            e.escapePosArr.forEach((d: MPos) => d.isVacancy = false);
         });
     }
 }

+ 1 - 0
assets/scripts/game/Game.ts

@@ -107,6 +107,7 @@ export class Game extends BaseExp {
             map.parent = this.map_pos.parent;
             map.worldPosition = this.map_pos.worldPosition;
             this.map = map.getComponent(GMap);
+            this.map.resetData();
             //创建敌人的组建
             this.buildEnemys = this.map.getComponent(BuildEnemys);
             //玩家组建

+ 1 - 7
assets/scripts/game/Main.ts

@@ -66,15 +66,9 @@ export class Main extends BaseExp {
         if(!Constants.isDebug){
            this.editBox.node.active = false;
         }
-        this.playBGM();
-    }
-
-    /**
-     * 激活时的位置信息
-     */
-    protected onEnable(): void {
         //存储初始位置到类属性
         this.originalPositions = this.animPosArr.map(e => e.position.clone());
+        this.playBGM();
     }
 
     /**

+ 8 - 1
assets/scripts/ui/GunfightShootUI.ts

@@ -526,7 +526,14 @@ export class GunfightShootUI extends BaseExp {
                     break
             }
         }else if (btnName === 'cut_gun_btn') {//切枪
-            if(userIns.data.guns.length <= 1)return;
+            if(userIns.data.guns.length <= 1){
+                MsgHints.show('Go unlock more guns');
+                return;
+            }
+            if(Game.I.player.isReloadMagazine){
+                MsgHints.show('Loading ammo...');
+                return;
+            }
             if(userIns.data.cutNum > 0){
                 Game.I.player.randomCutGun();
             }else{//看视频加切换次数

+ 11 - 4
assets/scripts/ui/ObtainUI.ts

@@ -4,7 +4,7 @@ import { autoBind } from '../extend/AutoBind';
 import { userIns } from '../data/UserData';
 import { Constants } from '../data/Constants';
 import { uiMgr } from '../core/manager/UIManager';
-import { ResUtil } from '../utils/ResUtil';
+import { ITEM_TYPE, ResUtil } from '../utils/ResUtil';
 import i18n from '../core/i18n/runtime-scripts/LanguageData';
 const { ccclass, property } = _decorator;
 
@@ -31,6 +31,8 @@ export class ObtainUI extends BaseExp {
     private id: string = '';
     //回调函数
     private cb:Function = null;
+    //是否需要把枪转换成金币和钻石
+    private isConvert:boolean = false;
 
     start() {
         this.closeOnBlank = false;
@@ -71,7 +73,7 @@ export class ObtainUI extends BaseExp {
             //是金币和钻石自动关闭
             this.scheduleOnce(()=>{
                uiMgr.hide(Constants.popUIs.obtainUI,this.cb);
-            },2);
+            },1.5);
         }else{
             this.confim_btn.active = true;
             //是解锁的枪 这儿需要判断是否已经拥有的了这把枪 如果已经拥有了这把枪 就转换成钻石和金币
@@ -80,8 +82,11 @@ export class ObtainUI extends BaseExp {
                const [good_id,amount] = this.data.value.split('_');
                const sData:any = userIns.itemTable.find(e=>e.id == good_id);
                this.dec_lable.string = `Already owned ${this.data.name_lang}, converted ${amount} ${sData.name_lang}`;
-            }else{
+               this.isConvert = true;
+            }else{//没有拥有这把枪 直接解锁
+                userIns.unlockGun(gun_id);
                 this.owned_lable.active = false;
+                this.isConvert = false;
             }
         }
     }
@@ -98,7 +103,9 @@ export class ObtainUI extends BaseExp {
         if(btnName === 'confim_btn' 
             || btnName === 'close_btn'){
             this.unscheduleAllCallbacks();
-            uiMgr.hide(Constants.popUIs.obtainUI,this.cb);
+            uiMgr.hide(Constants.popUIs.obtainUI,()=>{
+                this.cb?.(this.isConvert);
+            });
         }
     }
 }

+ 0 - 4
assets/scripts/ui/SuccessUI.ts

@@ -1,12 +1,8 @@
 import { _decorator, Node, Label, Sprite, EventTouch, Tween, tween, Vec3} from 'cc';
 import { BaseExp } from '../core/base/BaseExp';
-import List from '../third/List';
 import { autoBind } from '../extend/AutoBind';
 import { userIns } from '../data/UserData';
-import MsgHints from '../utils/MsgHints';
 import { Constants } from '../data/Constants';
-import { stateMgr } from '../core/manager/StateManager';
-import { UpgradeItem } from '../items/item/UpgradeItem';
 import { uiMgr } from '../core/manager/UIManager';
 import { ResUtil } from '../utils/ResUtil';
 import i18n from '../core/i18n/runtime-scripts/LanguageData';

+ 24 - 12
assets/scripts/ui/TossBoomerangUI.ts

@@ -1,4 +1,4 @@
-import { _decorator, Node, Label, EventTouch, Vec3, UITransform, Prefab, tween} from 'cc';
+import { _decorator, Node, Label, EventTouch, Vec3, UITransform, tween} from 'cc';
 import { BaseExp } from '../core/base/BaseExp';
 import { autoBind } from '../extend/AutoBind';
 import { Constants } from '../data/Constants';
@@ -8,8 +8,8 @@ import { uiMgr } from '../core/manager/UIManager';
 import { stateMgr } from '../core/manager/StateManager';
 import { ITEM_TYPE, ResUtil } from '../utils/ResUtil';
 import { PoolManager } from '../core/manager/PoolManager';
-import { bundleMgr } from '../core/manager/BundleManager';
 import { audioMgr } from '../core/manager/AudioManager';
+import N from '../extend/Nodes';
 const { ccclass, property } = _decorator;
 
 //扔飞镖
@@ -103,6 +103,7 @@ export class TossBoomerangUI extends BaseExp {
         //加载飞镖预制体
         ResUtil.loadRes(`items/tossBoomerang`).then((ret:Node)=>{
             var boomerang:Node = PoolManager.getNode(ret,this.content);
+            N(boomerang).order_n = 10000;
             //获取靶面尺寸(假设靶面锚点在中心)
             const targetSize = target_plate.getComponent(UITransform)?.contentSize;
             //生成随机角度(0-360度)
@@ -164,13 +165,13 @@ export class TossBoomerangUI extends BaseExp {
                     boomerang.position = targetPos;
                 })
                 .start();
-                this.scheduleOnce(() => {
-                    if(boomerang.parent) {
-                        PoolManager.putNode(boomerang);
-                        this.handleReward(selectedItem);
-                        this.isBoomeranging = false;
-                    }
-                },1)
+            this.scheduleOnce(() => {
+                if(boomerang.parent) {
+                    PoolManager.putNode(boomerang);
+                    this.handleReward(selectedItem);
+                    this.isBoomeranging = false;
+                }
+            },1)
         });
     }
 
@@ -197,9 +198,20 @@ export class TossBoomerangUI extends BaseExp {
                 }
                 break;
             default: {//武器解锁 获得显示武器栏
-                   const [gun_id,num] = item.quantity.split('_');
-                   userIns.unlockGun(gun_id);
-                   uiMgr.show(Constants.popUIs.obtainUI,[item.id,()=>{}]);
+                   uiMgr.show(Constants.popUIs.obtainUI,[item.id,(isCover: boolean)=>{
+                        //是否拥有这把需要转化
+                        if(isCover){
+                            const [good_id,amount] = item.value.split('_');
+                            const sData:any = userIns.itemTable.find(e=>e.id == good_id);
+                            if(sData.id == 1001){//金币
+                                userIns.data.gold += parseInt(amount);
+                                ResUtil.flyAnim(ITEM_TYPE.Coin, this.shoot_btn, this.gold_lable.node, 5, 50,(b) => {});
+                            }else if(sData.id == 1002){//钻石
+                                userIns.data.diamond += parseInt(amount);
+                                ResUtil.flyAnim(ITEM_TYPE.Diamond, this.shoot_btn, this.diamond_lable.node, 5, 50,(b) => {});
+                            }
+                        }
+                    }]);
                 }
                 break;
         }

TEMPAT SAMPAH
assets/textures/boomerang/buy_bg.png


+ 19 - 19
assets/textures/boomerang/buy_bg.png.meta

@@ -41,14 +41,14 @@
       "userData": {
         "trimThreshold": 1,
         "rotated": false,
-        "offsetX": -2.5,
-        "offsetY": 2,
+        "offsetX": 0,
+        "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
         "width": 588,
-        "height": 773,
-        "rawWidth": 593,
-        "rawHeight": 777,
+        "height": 730,
+        "rawWidth": 588,
+        "rawHeight": 730,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -61,16 +61,16 @@
         "vertices": {
           "rawPosition": [
             -294,
-            -386.5,
+            -365,
             0,
             294,
-            -386.5,
+            -365,
             0,
             -294,
-            386.5,
+            365,
             0,
             294,
-            386.5,
+            365,
             0
           ],
           "indexes": [
@@ -83,32 +83,32 @@
           ],
           "uv": [
             0,
-            777,
+            730,
             588,
-            777,
+            730,
+            0,
             0,
-            4,
             588,
-            4
+            0
           ],
           "nuv": [
             0,
-            0.005148005148005148,
-            0.9915682967959528,
-            0.005148005148005148,
             0,
             1,
-            0.9915682967959528,
+            0,
+            0,
+            1,
+            1,
             1
           ],
           "minPos": [
             -294,
-            -386.5,
+            -365,
             0
           ],
           "maxPos": [
             294,
-            386.5,
+            365,
             0
           ]
         },

+ 1 - 1
profiles/v2/packages/reference-image.json

@@ -3,6 +3,6 @@
   "config": {
     "images": [],
     "sceneUUID": {},
-    "scene": "2a6d10bc-9c1e-4420-ae90-e9ba997eea5f"
+    "scene": "78b2a53e-ee70-4c31-8746-1f752c9a8b92"
   }
 }

+ 1 - 1
profiles/v2/packages/scene.json

@@ -5,7 +5,7 @@
     "__version__": "1.3.9"
   },
   "gizmos-infos": {
-    "is2D": false,
+    "is2D": true,
     "is3DIcon": false,
     "iconSize": 2,
     "gridVisible": true,

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini