Browse Source

子弹释放

zhoupeng 1 year ago
parent
commit
3ec491938f
2 changed files with 331 additions and 55 deletions
  1. 330 54
      airPlay/assets/Scene/game.fire
  2. 1 1
      airPlay/assets/Script/game/player.ts

+ 330 - 54
airPlay/assets/Scene/game.fire

@@ -78,31 +78,31 @@
         "__id__": 7
       },
       {
-        "__id__": 25
+        "__id__": 33
       },
       {
-        "__id__": 27
+        "__id__": 35
       },
       {
-        "__id__": 28
+        "__id__": 36
       },
       {
-        "__id__": 34
+        "__id__": 42
       },
       {
-        "__id__": 38
+        "__id__": 46
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 40
+        "__id__": 48
       },
       {
-        "__id__": 41
+        "__id__": 49
       },
       {
-        "__id__": 42
+        "__id__": 50
       }
     ],
     "_prefab": null,
@@ -309,19 +309,19 @@
         "__id__": 8
       },
       {
-        "__id__": 12
+        "__id__": 14
       },
       {
-        "__id__": 16
+        "__id__": 20
       },
       {
-        "__id__": 20
+        "__id__": 26
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 24
+        "__id__": 32
       }
     ],
     "_prefab": null,
@@ -390,6 +390,12 @@
       },
       {
         "__id__": 11
+      },
+      {
+        "__id__": 12
+      },
+      {
+        "__id__": 13
       }
     ],
     "_prefab": null,
@@ -518,6 +524,69 @@
     },
     "_id": "92eM1J9VBGQoaQZ1sTxUg7"
   },
+  {
+    "__type__": "3491dCwpnhFEqX9BL4D2ZCF",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 8
+    },
+    "_enabled": true,
+    "auto_update_point": true,
+    "_id": "12l8/FCelK1K/2cndjjbyj"
+  },
+  {
+    "__type__": "43ca4XWdF1CwJKowXL8JAQ/",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 8
+    },
+    "_enabled": true,
+    "_draw_collide": false,
+    "_collide_shape": 1,
+    "collide_group_id": 6,
+    "_radius": 50,
+    "_size": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 1500
+    },
+    "_polygon_points": [
+      {
+        "__type__": "cc.Vec2",
+        "x": -45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 60,
+        "y": 40
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 0,
+        "y": 70
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": -60,
+        "y": 40
+      }
+    ],
+    "_offset": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "data_string": "",
+    "_id": "408POSv0FCtK1c1kAH+jvE"
+  },
   {
     "__type__": "cc.Node",
     "_name": "New Node",
@@ -529,13 +598,19 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 13
+        "__id__": 15
       },
       {
-        "__id__": 14
+        "__id__": 16
       },
       {
-        "__id__": 15
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 19
       }
     ],
     "_prefab": null,
@@ -591,7 +666,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 12
+      "__id__": 14
     },
     "_enabled": true,
     "alignMode": 1,
@@ -618,7 +693,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 12
+      "__id__": 14
     },
     "_enabled": true,
     "_type": 0,
@@ -643,7 +718,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 12
+      "__id__": 14
     },
     "_enabled": true,
     "tag": 0,
@@ -664,6 +739,69 @@
     },
     "_id": "238KfcmJFE05PBolZSfWtT"
   },
+  {
+    "__type__": "3491dCwpnhFEqX9BL4D2ZCF",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "auto_update_point": true,
+    "_id": "d9YeaRim1Ow7u4pUul2j2t"
+  },
+  {
+    "__type__": "43ca4XWdF1CwJKowXL8JAQ/",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_draw_collide": false,
+    "_collide_shape": 1,
+    "collide_group_id": 6,
+    "_radius": 50,
+    "_size": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 1500
+    },
+    "_polygon_points": [
+      {
+        "__type__": "cc.Vec2",
+        "x": -45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 60,
+        "y": 40
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 0,
+        "y": 70
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": -60,
+        "y": 40
+      }
+    ],
+    "_offset": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "data_string": "",
+    "_id": "fbsV1rqGdNWYaTW7NQ6xhX"
+  },
   {
     "__type__": "cc.Node",
     "_name": "New Node",
@@ -675,13 +813,19 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 17
+        "__id__": 21
       },
       {
-        "__id__": 18
+        "__id__": 22
       },
       {
-        "__id__": 19
+        "__id__": 23
+      },
+      {
+        "__id__": 24
+      },
+      {
+        "__id__": 25
       }
     ],
     "_prefab": null,
@@ -737,7 +881,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 16
+      "__id__": 20
     },
     "_enabled": true,
     "alignMode": 1,
@@ -764,7 +908,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 16
+      "__id__": 20
     },
     "_enabled": true,
     "_type": 0,
@@ -789,7 +933,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 16
+      "__id__": 20
     },
     "_enabled": true,
     "tag": 0,
@@ -810,6 +954,69 @@
     },
     "_id": "78HZerWxJPII2Sx9hi6lgh"
   },
+  {
+    "__type__": "3491dCwpnhFEqX9BL4D2ZCF",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "auto_update_point": true,
+    "_id": "71PciU+fpPYalVQ2FZOHR0"
+  },
+  {
+    "__type__": "43ca4XWdF1CwJKowXL8JAQ/",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_draw_collide": false,
+    "_collide_shape": 1,
+    "collide_group_id": 6,
+    "_radius": 50,
+    "_size": {
+      "__type__": "cc.Size",
+      "width": 640,
+      "height": 40
+    },
+    "_polygon_points": [
+      {
+        "__type__": "cc.Vec2",
+        "x": -45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 60,
+        "y": 40
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 0,
+        "y": 70
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": -60,
+        "y": 40
+      }
+    ],
+    "_offset": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "data_string": "",
+    "_id": "33BJp6puBD3bHCdcRVgNZI"
+  },
   {
     "__type__": "cc.Node",
     "_name": "New Node",
@@ -821,13 +1028,19 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 21
+        "__id__": 27
       },
       {
-        "__id__": 22
+        "__id__": 28
       },
       {
-        "__id__": 23
+        "__id__": 29
+      },
+      {
+        "__id__": 30
+      },
+      {
+        "__id__": 31
       }
     ],
     "_prefab": null,
@@ -883,7 +1096,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 20
+      "__id__": 26
     },
     "_enabled": true,
     "alignMode": 1,
@@ -910,7 +1123,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 20
+      "__id__": 26
     },
     "_enabled": true,
     "_type": 0,
@@ -935,7 +1148,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 20
+      "__id__": 26
     },
     "_enabled": true,
     "tag": 0,
@@ -956,6 +1169,69 @@
     },
     "_id": "89Cp4+lYVJnozfhx/bHFRQ"
   },
+  {
+    "__type__": "3491dCwpnhFEqX9BL4D2ZCF",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 26
+    },
+    "_enabled": true,
+    "auto_update_point": true,
+    "_id": "90veamXFlP9JnfNu3TtDKB"
+  },
+  {
+    "__type__": "43ca4XWdF1CwJKowXL8JAQ/",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 26
+    },
+    "_enabled": true,
+    "_draw_collide": false,
+    "_collide_shape": 1,
+    "collide_group_id": 6,
+    "_radius": 50,
+    "_size": {
+      "__type__": "cc.Size",
+      "width": 640,
+      "height": 40
+    },
+    "_polygon_points": [
+      {
+        "__type__": "cc.Vec2",
+        "x": -45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 45,
+        "y": -45
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 60,
+        "y": 40
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": 0,
+        "y": 70
+      },
+      {
+        "__type__": "cc.Vec2",
+        "x": -60,
+        "y": 40
+      }
+    ],
+    "_offset": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "data_string": "",
+    "_id": "97ue+/yvJOa4B9B+WIvIFc"
+  },
   {
     "__type__": "cc.Widget",
     "_name": "",
@@ -990,7 +1266,7 @@
       "__id__": 2
     },
     "_prefab": {
-      "__id__": 26
+      "__id__": 34
     },
     "_name": "@player",
     "_active": true,
@@ -1021,7 +1297,7 @@
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 25
+      "__id__": 33
     },
     "asset": {
       "__uuid__": "e7a4df83-43eb-4dd7-9347-a5402b7e33f8"
@@ -1096,16 +1372,16 @@
     },
     "_children": [
       {
-        "__id__": 29
+        "__id__": 37
       },
       {
-        "__id__": 31
+        "__id__": 39
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 41
       }
     ],
     "_prefab": null,
@@ -1161,13 +1437,13 @@
     "_name": "$level_node",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 28
+      "__id__": 36
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 30
+        "__id__": 38
       }
     ],
     "_prefab": null,
@@ -1223,7 +1499,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 29
+      "__id__": 37
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1250,13 +1526,13 @@
     "_name": "$levelTitle_lb",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 28
+      "__id__": 36
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 32
+        "__id__": 40
       }
     ],
     "_prefab": null,
@@ -1312,7 +1588,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 31
+      "__id__": 39
     },
     "_enabled": true,
     "_materials": [
@@ -1345,7 +1621,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 28
+      "__id__": 36
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1378,14 +1654,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 35
+        "__id__": 43
       },
       {
-        "__id__": 36
+        "__id__": 44
       }
     ],
     "_prefab": {
-      "__id__": 37
+      "__id__": 45
     },
     "_opacity": 255,
     "_color": {
@@ -1439,7 +1715,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 34
+      "__id__": 42
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1466,7 +1742,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 34
+      "__id__": 42
     },
     "_enabled": true,
     "_id": "a4i1WA1tZEX6iQd7viSwQ9"
@@ -1474,7 +1750,7 @@
   {
     "__type__": "cc.PrefabInfo",
     "root": {
-      "__id__": 34
+      "__id__": 42
     },
     "asset": {
       "__uuid__": "e7d4dc80-56d7-4cab-a629-4fb72693f56c"
@@ -1493,7 +1769,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 39
+        "__id__": 47
       }
     ],
     "_prefab": null,
@@ -1549,7 +1825,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 38
+      "__id__": 46
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1624,16 +1900,16 @@
     },
     "_enabled": true,
     "$bulletLayer_node": {
-      "__id__": 27
+      "__id__": 35
     },
     "$level_node": {
-      "__id__": 29
+      "__id__": 37
     },
     "$levelTitle_lb": {
-      "__id__": 32
+      "__id__": 40
     },
     "$ui_node": {
-      "__id__": 38
+      "__id__": 46
     },
     "bulletPrefab": {
       "__uuid__": "4e83526c-b769-4e1b-b877-cabff7326e9f"

+ 1 - 1
airPlay/assets/Script/game/player.ts

@@ -24,7 +24,7 @@ export default class player extends GameLogic {
     // moveCpt: move = null;
     moveCpt: MoveDest = null;
     // dirction: cc.Vec2 = cc.v2(0,1);
-    bulletCD:number = 0.05;
+    bulletCD:number = 0.5;
     bulletCDTime: number = 0;
 
     airStartPos: cc.Vec2;