瀏覽代碼

Merge branch 'master' of http://47.104.13.119:3000/zhoupeng/airWar

杜方 1 年之前
父節點
當前提交
a477e19f1f

+ 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,

+ 1 - 2
editor/start.bat

@@ -1,3 +1,2 @@
 npx anywhere -d .\web-desktop\
-pause
- 
+pause

+ 1 - 1
editor/web-desktop/assets/main/config.json

@@ -1 +1 @@
-{"paths":{},"types":[],"uuids":["2dL3kvpAxJu6GJ7RdqJG5J","02ikbUVLhF5aC6uHYyXO+R","0esnrmFttLGJzWSORxZgzM","16sjMSMzpKF5ztK5GpUBeN","3bOY1sdwVMMKx+tYSx5Uuj","3cdqXpOV5Px54AKarEXkwL","451EKaUppISYxb44sUugTV","53mk0B05JOzp0kCpYTtNgT","53xgDko8VDW7lLzqikLQAl","5dklvalvhJy7+hntRe0FtI","9dekChD6hC05XtZe1B8Bpv","c3HBV2+rBE9r4wQa2oCV2G","d14pVyW0BGS4MQUEJz7gRO","d2H8t9UXJAzo6OVTLa4jxv","e7pN+DQ+tN15NHpUArfjP4","ecpdLyjvZBwrvm+cedCcQy","f1d5omTlZMtqnrEDYyNZuM","fd5mHVP81AuIOkEItJTBCu","fe9wQ4jFJEu6Go8eHiIoko"],"scenes":{"db://assets/Scene/aniScene.fire":12,"db://assets/Scene/game.fire":0,"db://assets/Scene/pathtest.fire":11,"db://assets/Scene/test.fire":8},"redirect":[1,0,2,0,5,0,9,0,15,1,16,0,17,0,18,0],"deps":["resources","internal"],"packs":{"04e87cdb0":[3,0,6,7,13,14]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false}
+{"paths":{},"types":[],"uuids":["2dL3kvpAxJu6GJ7RdqJG5J","02ikbUVLhF5aC6uHYyXO+R","0esnrmFttLGJzWSORxZgzM","16sjMSMzpKF5ztK5GpUBeN","3bOY1sdwVMMKx+tYSx5Uuj","3cdqXpOV5Px54AKarEXkwL","451EKaUppISYxb44sUugTV","53mk0B05JOzp0kCpYTtNgT","53xgDko8VDW7lLzqikLQAl","5dklvalvhJy7+hntRe0FtI","9dekChD6hC05XtZe1B8Bpv","a1U5RdJRFMFL57BdJC9H1X","c3HBV2+rBE9r4wQa2oCV2G","d14pVyW0BGS4MQUEJz7gRO","d2H8t9UXJAzo6OVTLa4jxv","e7pN+DQ+tN15NHpUArfjP4","ecpdLyjvZBwrvm+cedCcQy","f1d5omTlZMtqnrEDYyNZuM","fd5mHVP81AuIOkEItJTBCu","fe9wQ4jFJEu6Go8eHiIoko"],"scenes":{"db://assets/Scene/aniScene.fire":13,"db://assets/Scene/game.fire":0,"db://assets/Scene/pathtest.fire":12,"db://assets/Scene/test.fire":8},"redirect":[1,0,2,0,5,0,9,0,11,1,16,1,17,0,18,0,19,0],"deps":["resources","internal"],"packs":{"04e87cdb0":[3,0,6,7,14,15]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false}

+ 1 - 1
editor/web-desktop/assets/main/import/53/53c600e4-a3c5-435b-b94b-cea8a42d0025.json

@@ -1 +1 @@
-[1,0,["node","$ui_node","$layer_node","scene","_parent"],[["cc.Node",["_name","_id","_components","_contentSize","_parent","_children","_trs"],1,9,5,1,2,7],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Scene",["_name","_children","_anchorPoint","_trs"],2,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["cc.Canvas",["_fitWidth","_fitHeight","node","_designResolution"],1,1,5],["cc.Widget",["_alignFlags","node"],2,1],["c8ad6fhb1BESYIiTZAAD3ne",["node","$layer_node","$ui_node"],3,1,1,1]],[[0,0,4,2],[1,0,1,3],[2,0,1,2,3,2],[0,0,1,5,2,3,6,3],[0,0,4,2,3,2],[3,0,1,2,3],[4,0,1,2,3,3],[5,0,1,2],[6,0,1,2,1]],[[1,"test",null],[3,"test","a5esZu+45LA5mBpvttspPD",[-6,-7,-8],[[6,true,false,-1,[5,640,1136]],[7,45,-2],[8,-5,-4,-3]],[5,640,1136],[320,568,0,0,0,0,1,1,1,1]],[2,"New Node",[1],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[4,"Main Camera",1,[[5,7,-1,-9]],[5,960,640]],[0,"$layer_node",1],[0,"$ui_node",1]],0,[0,0,1,0,0,1,0,1,5,0,2,4,0,0,1,0,-1,3,0,-2,4,0,-3,5,0,0,3,0,3,2,1,4,2,9],[],[],[]]
+[1,["a1U5RdJRFMFL57BdJC9H1X"],["node","_parent","$ui_node","$top_node","$layer_node","scene"],[["cc.Node",["_name","_id","_components","_contentSize","_parent","_children","_trs"],1,9,5,1,2,7],["cc.Widget",["_alignFlags","_right","_bottom","node"],0,1],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Scene",["_name","_children","_anchorPoint","_trs"],2,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["079d2TH8t9PbagNA8UfVZr9",["node"],3,1],["cc.Graphics",["_lineWidth","node","_materials","_strokeColor","_fillColor"],2,1,3,5,5],["cc.Canvas",["_fitHeight","node","_designResolution"],2,1,5],["c8ad6fhb1BESYIiTZAAD3ne",["node","$content_node","$layer_node","$top_node","$ui_node"],3,1,1,1,1,1]],[[0,0,4,2],[2,0,1,3],[3,0,1,2,3,2],[0,0,1,5,2,3,6,3],[0,0,4,2,3,2],[0,0,5,2,3,2],[0,0,4,2,6,2],[4,0,1,2,3],[1,0,1,2,3,4],[1,3,1],[1,0,3,2],[5,0,1],[6,0,1,2,3,4,2],[7,0,1,2,2],[8,0,1,2,3,4,1]],[[1,"test",null],[5,"$content_node",[-4,-5,-6],[[9,-1],[11,-2],[12,5,-3,[0],[4,4278190335],[4,4278190335]]],[5,640,1136]],[3,"test","a5esZu+45LA5mBpvttspPD",[-13,1],[[13,false,-7,[5,1136,1200]],[10,45,-8],[14,-12,1,-11,-10,-9]],[5,1136,1200],[568,600,0,0,0,0,1,1,1,1]],[6,"$top_node",1,[[8,9,320,568,-14]],[-320,568,0,0,0,0,1,1,1,1]],[2,"New Node",[2],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[4,"Main Camera",2,[[7,7,-1,-15]],[5,960,640]],[0,"$layer_node",1],[0,"$ui_node",1]],0,[0,0,1,0,0,1,0,0,1,0,-1,6,0,-2,3,0,-3,7,0,0,2,0,0,2,0,2,7,0,3,3,0,4,6,0,0,2,0,-1,5,0,0,3,0,0,5,0,5,4,1,1,2,2,1,4,15],[0],[-1],[0]]

文件差異過大導致無法顯示
+ 0 - 0
editor/web-desktop/assets/main/index.js


部分文件因文件數量過多而無法顯示