zhoupeng 1 рік тому
батько
коміт
005049ffac

+ 256 - 16
airPlay/assets/Scene/test.fire

@@ -73,21 +73,18 @@
       },
       {
         "__id__": 5
-      },
-      {
-        "__id__": 6
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 7
+        "__id__": 13
       },
       {
-        "__id__": 8
+        "__id__": 14
       },
       {
-        "__id__": 9
+        "__id__": 15
       }
     ],
     "_prefab": null,
@@ -101,8 +98,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 640,
-      "height": 1136
+      "width": 1136,
+      "height": 1200
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -113,8 +110,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        320,
         568,
+        600,
         0,
         0,
         0,
@@ -238,11 +235,89 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "$layer_node",
+    "_name": "$content_node",
     "_objFlags": 0,
     "_parent": {
       "__id__": 2
     },
+    "_children": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 9
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 11
+      },
+      {
+        "__id__": 12
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 640,
+      "height": 1136
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "24sv6OwhdMRLWmvl4bwQmU"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "$layer_node",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
     "_children": [],
     "_active": true,
     "_components": [],
@@ -294,12 +369,101 @@
     "groupIndex": 0,
     "_id": "5eZUC+lvxDAL0UFeBfa0Xw"
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "$top_node",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -320,
+        568,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "e2aAAeZo1P0rGmpC6izVbq"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 7
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 9,
+    "_left": 0,
+    "_right": 320,
+    "_top": 0,
+    "_bottom": 568,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "32IwYYLXFP9ZBxc9vSiLjM"
+  },
   {
     "__type__": "cc.Node",
     "_name": "$ui_node",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 2
+      "__id__": 5
     },
     "_children": [],
     "_active": true,
@@ -352,6 +516,76 @@
     "groupIndex": 0,
     "_id": "f83LJSzVxHtrSb3F67Fgfm"
   },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 0,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "50l1PLd21Pu41fInEWDYV6"
+  },
+  {
+    "__type__": "079d2TH8t9PbagNA8UfVZr9",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_id": "59j7xqiKNCD7i6RsX4LEvX"
+  },
+  {
+    "__type__": "cc.Graphics",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "a153945d-2511-4c14-be7b-05d242f47d57"
+      }
+    ],
+    "_lineWidth": 5,
+    "_strokeColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_lineJoin": 2,
+    "_lineCap": 0,
+    "_fillColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_miterLimit": 10,
+    "_id": "a2RUX2NZlMaouT6c19J2vF"
+  },
   {
     "__type__": "cc.Canvas",
     "_name": "",
@@ -362,10 +596,10 @@
     "_enabled": true,
     "_designResolution": {
       "__type__": "cc.Size",
-      "width": 640,
-      "height": 1136
+      "width": 1136,
+      "height": 1200
     },
-    "_fitWidth": true,
+    "_fitWidth": false,
     "_fitHeight": false,
     "_id": "59Cd0ovbdF4byw5sbjJDx7"
   },
@@ -404,12 +638,18 @@
       "__id__": 2
     },
     "_enabled": true,
-    "$layer_node": {
+    "$content_node": {
       "__id__": 5
     },
-    "$ui_node": {
+    "$layer_node": {
       "__id__": 6
     },
+    "$top_node": {
+      "__id__": 7
+    },
+    "$ui_node": {
+      "__id__": 9
+    },
     "_id": "7futlKeM5PTJALRd/ASeIe"
   }
 ]

+ 13 - 0
airPlay/assets/Scene/test.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "d53a23ca-9e44-4c70-b145-eb12e1467fee",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 24 - 7
airPlay/assets/Scene/test.ts

@@ -6,6 +6,8 @@ import { BulletItem } from "../Script/game/cfg/bulletItem";
 import { ConfigMgr } from "../Script/game/cfg/configMgr";
 import { Utils } from "../Script/game/common/utils";
 import { Barrage } from "../Script/game/nest/barrage";
+import { NestPlay } from "../Script/game/nest/nestPlay";
+import { Draw } from "./test/draw";
 
 const {ccclass, property} = cc._decorator;
 
@@ -13,14 +15,20 @@ const {ccclass, property} = cc._decorator;
 export default class test extends cc.Component {
 
     /*===========================自动绑定组件开始===========================*/
+    /*自动生成*/
+    @property({type:cc.Node, displayName:""})
+    private $content_node:cc.Node = null;
+    
 	/*自动生成*/
     @property({type:cc.Node, displayName:""})
     private $layer_node:cc.Node = null;
-
-    /*自动生成*/
+	/*自动生成*/
+    @property({type:cc.Node, displayName:""})
+    private $top_node:cc.Node = null;
+	/*自动生成*/
     @property({type:cc.Node, displayName:""})
     private $ui_node:cc.Node = null;
-    
+
 	/*===========================自动绑定组件结束===========================*/
 
     /*===========================自动生成按钮事件开始==========================*/
@@ -28,6 +36,19 @@ export default class test extends cc.Component {
 	/*===========================自动生成按钮事件结束==========================*/
 
     protected async onLoad() {
+        await ConfigMgr.inst.init();
+        this.$content_node.addComponent(Draw);
+        let nestNode = Utils.createNode(this.$top_node, `nest`);
+        nestNode.addComponent(Draw);
+        let nestPlay = nestNode.addComponent(NestPlay);
+        nestPlay.init('101',1);
+    }
+    
+    async testCfg(){
+        await ConfigMgr.inst.init();
+    }
+
+    async testBullet(){
         await this.testCfg();
         UIMgr.inst.setup(this.$ui_node, UILayerNames.length, UILayerNames);
         UIMgr.inst.showUI(UIList.debug);
@@ -40,8 +61,4 @@ export default class test extends cc.Component {
             atk:80,
         }, bulletItem);
     }
-    
-    async testCfg(){
-        await ConfigMgr.inst.init();
-    }
 }

+ 24 - 0
airPlay/assets/Scene/test/draw.ts

@@ -0,0 +1,24 @@
+const {ccclass, property, executeInEditMode, playOnFocus} = cc._decorator;
+
+@ccclass
+@executeInEditMode
+export class Draw extends cc.Component {
+    protected onLoad(): void {
+        let debugDrawer = this.node.addComponent(cc.Graphics);
+        debugDrawer.lineWidth = 5;
+        debugDrawer.strokeColor = new cc.Color(255, 0, 0);
+        debugDrawer.fillColor = new cc.Color(255, 0, 0);
+
+        let size = this.node.getContentSize();
+        if(size.width == 0){
+            size = cc.size(10,10)
+        }
+        
+        debugDrawer.moveTo(-size.width * 0.5 , -size.height * 0.5 );
+        debugDrawer.lineTo(-size.width * 0.5 , +size.height * 0.5 );
+        debugDrawer.lineTo(size.width * 0.5 , +size.height * 0.5 );
+        debugDrawer.lineTo(size.width * 0.5 , -size.height * 0.5 );
+        debugDrawer.lineTo(-size.width * 0.5 , -size.height * 0.5 );
+        debugDrawer.stroke();
+    }
+}

+ 10 - 0
airPlay/assets/Scene/test/draw.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "079d24c7-f2df-4f6d-a80d-03c51f559afd",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 0 - 4
airPlay/assets/Script/game/nest/nestPlay.ts

@@ -20,7 +20,6 @@ const Shape = {
     102: 'monsterboss2',
     201: 'pattern201',
     202: 'pattern202',
-
 }
 
 const aniArr = [
@@ -194,10 +193,7 @@ export class NestPlay extends cc.Component {
                         }
                     });
                 }
-
                 callAni();
-
-
             }, 1000 * this.time * index);
             this.timeArr.push(tId);
         }

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

@@ -29,7 +29,7 @@ export default class player extends GameLogic {
 
     airStartPos: cc.Vec2;
 
-    static PlayerAttack = false;
+    static PlayerAttack = true;
 
     protected onLoad(): void {
         this.moveCpt = this.node.getComponent(MoveDest);

+ 1 - 1
airPlay/assets/Script/game/update/logic.ts

@@ -31,7 +31,7 @@ export class GameLogicMgr {
             aniMgr._oldUpdate = aniMgr.update;
             aniMgr.update = function(dt){
                 if(GameLogicMgr.inst.isGamePause) return;
-                aniMgr._oldUpdate(dt*0.5);
+                aniMgr._oldUpdate(dt*0.15);
             }
 
             // @ts-ignore

+ 1 - 1
airPlay/packages/CocosInspector/cocos-inspector-config.json

@@ -1 +1 @@
-{"logCount":3,"retinaEnable":true,"autoUpdateTree":true,"sliderWithInput":false,"disableWebSec":false,"displayAsFairyTree":false,"hideFairyComContainer":false,"syncNodeDetail":true,"showZ":true,"showDevToolInTab":true,"size":[720,1280],"extraSizes":[],"isPortrait":true,"show":false,"urlParams":"","customUrl":"","clearLogAfterRefresh":true,"extensionFile":"","enableExtension":true,"showDc":false,"showZIndex":false,"sortCompProperties":{"<Widget>":true,"<UIUpdater>":false,"<Canvas>":false,"<Start>":false,"<Camera>":false,"<RigidBody>":false,"<PhysicsBoxCollider>":false,"<Label>":true},"simpleMode":false,"orderNum":"STORE06cea072e06c6","glass":false,"showChildrenCount":false,"openArrayLimit":5,"prefabFontSize":1.15,"useChinese":true,"spaceToPause":false,"theme":"dark","httpProxyServer":"","proxyBypassRules":"","openHttpProxy":false,"propertyAlignLeft":false}
+{"logCount":3,"retinaEnable":true,"autoUpdateTree":true,"sliderWithInput":false,"disableWebSec":false,"displayAsFairyTree":false,"hideFairyComContainer":false,"syncNodeDetail":true,"showZ":true,"showDevToolInTab":true,"size":[768,1024],"extraSizes":[],"isPortrait":true,"show":false,"urlParams":"","customUrl":"","clearLogAfterRefresh":true,"extensionFile":"","enableExtension":true,"showDc":false,"showZIndex":false,"sortCompProperties":{"<Widget>":true,"<UIUpdater>":false,"<Canvas>":false,"<Start>":false,"<Camera>":false,"<RigidBody>":false,"<PhysicsBoxCollider>":false,"<Label>":true},"simpleMode":false,"orderNum":"STORE06cea072e06c6","glass":false,"showChildrenCount":false,"openArrayLimit":5,"prefabFontSize":1.15,"useChinese":true,"spaceToPause":false,"theme":"dark","httpProxyServer":"","proxyBypassRules":"","openHttpProxy":false,"propertyAlignLeft":false}

+ 1 - 1
airPlay/settings/project.json

@@ -42,7 +42,7 @@
     "width": 960,
     "height": 640
   },
-  "last-module-event-record-time": 1697018909958,
+  "last-module-event-record-time": 1697630794578,
   "assets-sort-type": "name",
   "facebook": {
     "enable": false,