Browse Source

修改UIMgr实现方式

zhoupeng 1 year ago
parent
commit
9c0943b33d

+ 99 - 7
airPlay/assets/Scene/game.fire

@@ -85,18 +85,21 @@
       },
       {
         "__id__": 29
+      },
+      {
+        "__id__": 30
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 30
+        "__id__": 32
       },
       {
-        "__id__": 31
+        "__id__": 33
       },
       {
-        "__id__": 32
+        "__id__": 34
       }
     ],
     "_prefab": null,
@@ -385,7 +388,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "$wallLayer_node",
+    "_name": "wallLayer_node",
     "_objFlags": 0,
     "_parent": {
       "__id__": 2
@@ -1175,6 +1178,95 @@
     "groupIndex": 0,
     "_id": "baV5qqfcJIoqR18npximGh"
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "$ui_node",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 31
+      }
+    ],
+    "_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": "a6u8nkD91E2oL1EFpvET+l"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 30
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_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": "412lV+zVRNyZeMQJaZ06iz"
+  },
   {
     "__type__": "cc.Canvas",
     "_name": "",
@@ -1227,12 +1319,12 @@
       "__id__": 2
     },
     "_enabled": true,
-    "$wallLayer_node": {
-      "__id__": 11
-    },
     "$bulletLayer_node": {
       "__id__": 29
     },
+    "$ui_node": {
+      "__id__": 30
+    },
     "bulletPrefab": {
       "__uuid__": "4e83526c-b769-4e1b-b877-cabff7326e9f"
     },

+ 0 - 189
airPlay/assets/Script/Core/Ui/UIController.ts

@@ -193,195 +193,6 @@ export class UIController extends cc.EventTarget {
         this.node = null;
     }
 
-    /**
-     * @en add button event handler
-     * @zh 添加按钮事件
-     * @param relativeNodePath to indicate a button node, can pass `string`|`cc.Node`|`cc.Button` here.
-     * @param cb will be called when event emits. method format:(btn:cc.Button,args:any)=>void
-     * @param target the `this` argument of `cb`
-     *  */
-    onButtonEvent(relativeNodePath: string | cc.Node | cc.Button, cb: Function, target?: any, args?: any) {
-
-        let buttonNode: cc.Node = null;
-        if (relativeNodePath instanceof cc.Node) {
-            buttonNode = relativeNodePath;
-        }
-        else if (relativeNodePath instanceof cc.Button) {
-            buttonNode = relativeNodePath.node;
-        }
-        else {
-            buttonNode = cc.find(relativeNodePath, this.node);
-        }
-
-        if (!buttonNode) {
-            return null;
-        }
-
-        //添加转发器
-        let agent = this.node.getComponent(__NodeEventAgent__);
-        if (!agent) {
-            agent = this.node.addComponent(__NodeEventAgent__);
-        }
-
-        let btn = buttonNode.getComponent(cc.Button);
-        let clickEvents = btn.clickEvents;
-        let handler = new cc.Component.EventHandler();
-        handler.target = this.node;
-        handler.component = '__NodeEventAgent__';
-        handler.handler = 'onButtonClicked';
-        handler.customEventData = '' + UIController._idBase++;
-
-        //附加额外信息 供事件转发使用
-        handler['$cb$'] = cb;
-        handler['$target$'] = target;
-        handler['$args$'] = args;
-
-        clickEvents.push(handler);
-        btn.clickEvents = clickEvents;
-    }
-
-    /**
-     * @en remove button event handler
-     * @zh 移除按钮事件
-     * @param relativeNodePath to indicate a button node, can pass `string`|`cc.Node`|`cc.Button` here.
-     * @param cb will be called when event emits.
-     * @param target the `this` argument of `cb`
-     *  */
-    offButtonEvent(relativeNodePath: string | cc.Node | cc.Button, cb: Function, target: any) {
-        let buttonNode: cc.Node = null;
-        if (relativeNodePath instanceof cc.Node) {
-            buttonNode = relativeNodePath;
-
-        }
-        else if (relativeNodePath instanceof cc.Button) {
-            buttonNode = relativeNodePath.node;
-        }
-        else {
-            buttonNode = cc.find(relativeNodePath, this.node);
-        }
-
-        if (!buttonNode) {
-            return; ``
-        }
-
-        let agent = this.node.getComponent(__NodeEventAgent__);
-        if (!agent) {
-            return;
-        }
-        let btn = buttonNode.getComponent(cc.Button);
-        if (!btn) {
-            return;
-        }
-        let clickEvents = btn.clickEvents;
-        for (let i = 0; i < clickEvents.length; ++i) {
-            let h = clickEvents[i];
-            if (h['$cb$'] == cb && h['$target$'] == target) {
-                clickEvents.splice(i, 1);
-                btn.clickEvents = clickEvents;
-                break;
-            }
-        }
-    }
-
-    /**
-     * @en add toggle event handler
-     * @zh 添加Toggle事件
-     * @param relativeNodePath to indicate a button node, can pass `string`|`cc.Node`|`cc.Button` here.
-     * @param cb will be called when event emits. method format:(btn:cc.Button,args:any)=>void
-     * @param target the `this` argument of `cb`
-     *  */
-
-    onToggleEvent(relativeNodePath: string | cc.Node | cc.Button | cc.ToggleContainer, cb: Function, target?: any, args?: any) {
-        let buttonNode: cc.Node = null;
-        if (relativeNodePath instanceof cc.Node) {
-            buttonNode = relativeNodePath;
-        }
-        else if (relativeNodePath instanceof cc.Button) {
-            buttonNode = relativeNodePath.node;
-        }
-        else if (relativeNodePath instanceof cc.ToggleContainer) {
-            buttonNode = relativeNodePath.node;
-        }
-        else {
-            buttonNode = cc.find(relativeNodePath, this.node);
-        }
-
-        if (!buttonNode) {
-            return null;
-        }
-
-        //添加转发器
-        let agent = this.node.getComponent(__NodeEventAgent__);
-        if (!agent) {
-            agent = this.node.addComponent(__NodeEventAgent__);
-        }
-
-        let btn = buttonNode.getComponent(cc.Button) as any;
-        if (!btn) {
-            btn = buttonNode.getComponent(cc.ToggleContainer) as any;
-        }
-        let checkEvents = btn.checkEvents;
-        let handler = new cc.Component.EventHandler();
-        handler.target = this.node;
-        handler.component = '__NodeEventAgent__';
-        handler.handler = 'onToggleEvent';
-        handler.customEventData = '' + UIController._idBase++;
-
-        //附加额外信息 供事件转发使用
-        handler['$cb$'] = cb;
-        handler['$target$'] = target;
-        handler['$args$'] = args;
-
-        checkEvents.push(handler);
-        btn.checkEvents = checkEvents;
-    }
-
-    /**
-     * @en remove toggle event handler
-     * @zh 移除Toggle事件
-     * @param relativeNodePath to indicate a button node, can pass `string`|`cc.Node`|`cc.Button` here.
-     * @param cb will be called when event emits. method format:(btn:cc.Button,args:any)=>void
-     * @param target the `this` argument of `cb`
-     *  */
-    offToggleEvent(relativeNodePath: string | cc.Node | cc.Button | cc.ToggleContainer, cb: Function, target: any) {
-        let buttonNode: cc.Node = null;
-        if (relativeNodePath instanceof cc.Node) {
-            buttonNode = relativeNodePath;
-        }
-        else if (relativeNodePath instanceof cc.Button) {
-            buttonNode = relativeNodePath.node;
-        }
-        else if (relativeNodePath instanceof cc.ToggleContainer) {
-            buttonNode = relativeNodePath.node;
-        }
-        else {
-            buttonNode = cc.find(relativeNodePath, this.node);
-        }
-
-        if (!buttonNode) {
-            return null;
-        }
-
-        //添加转发器
-        let agent = this.node.getComponent(__NodeEventAgent__);
-        if (!agent) {
-            return;
-        }
-        let btn = buttonNode.getComponent(cc.Button) as any;
-        if (!btn) {
-            btn = buttonNode.getComponent(cc.ToggleContainer) as any;
-        }
-        let checkEvents = btn.checkEvents;
-        for (let i = 0; i < checkEvents.length; ++i) {
-            let h = checkEvents[i];
-            if (h['$cb$'] == cb && h['$target$'] == target) {
-                checkEvents.splice(i, 1);
-                btn.checkEvents = checkEvents;
-                break;
-            }
-        }
-    }
-
     /***
      * @en the extra resource needed by this ui panel.the ui will not be created until these res loaded.
      * @zh 本UI使用的依赖资源.UI会等这些资源加载完成后才创建。

+ 14 - 0
airPlay/assets/Script/Core/Ui/UIDef.ts

@@ -0,0 +1,14 @@
+import { UILayers } from "./UILayers";
+
+export interface IUIItem {
+    prefab:string;
+    layer: number;
+}
+
+export interface IUIList {
+    [key:string] : IUIItem;
+}
+
+export const UIList:IUIList = {
+    loading: {prefab: 'loading', layer: UILayers.popup}
+}

+ 10 - 0
airPlay/assets/Script/Core/Ui/UIDef.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "cb4cdc10-c600-4b00-ae08-393f419b992c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 88 - 87
airPlay/assets/Script/Core/Ui/UIMgr.ts

@@ -1,11 +1,36 @@
-import { UIController } from './UIController';
-import { ModuleContext } from '../Base/ModuleContext';
+import { IUIItem } from './UIDef';
 
 const { ccclass, property } = cc._decorator;
 
-class UIUpdater extends cc.Component {
-    update() {
-        UIController.updateAll();
+
+enum UILoadingState {
+    none,
+    loading,
+    show,
+    close,
+};   
+class UILoadingHandle {
+    private static _idBase = 0;
+    private _instId: number = 0;
+    constructor(){
+        this._instId = UILoadingHandle._idBase++;
+    }
+
+    public get instId(): number {
+        return this._instId;
+    }
+
+    state: UILoadingState = UILoadingState.loading;
+    asset: cc.Asset;
+    node: cc.Node;
+    uiData: IUIItem;
+
+    destory(){
+        if(cc.isValid(this.node, true)) {
+            this.node.destroy();
+        }
+        this.asset && this.asset.decRef();
+        this.state = UILoadingState.close;
     }
 }
 
@@ -26,6 +51,7 @@ export class UIMgr {
 
     private _uiCanvas: cc.Node;
     private _uiRoot: cc.Node;
+    handleArr:UILoadingHandle[] = [];  // 允许打开两个相同的界面
 
     private createFullScreenNode() {
         let canvas = this._uiCanvas;
@@ -69,11 +95,7 @@ export class UIMgr {
         }
 
         this._uiCanvas.name = '$tgxUICanvas$';
-        cc.game.addPersistRootNode(this._uiCanvas);
-
-        if (!this._uiCanvas.getComponent(UIUpdater)) {
-            this._uiCanvas.addComponent(UIUpdater);
-        }
+        // cc.game.addPersistRootNode(this._uiCanvas);
 
 
         layerNames ||= [];
@@ -87,6 +109,17 @@ export class UIMgr {
             let layerNode = this.createFullScreenNode();
             layerNode.name = 'ui_layer_' + (layerNames[i] ? layerNames[i] : i);
             this._uiRoot.addChild(layerNode);
+            layerNode.on(cc.Node.EventType.CHILD_REMOVED, this.uiRemove, this);
+        }
+    }
+
+    private uiRemove(node: cc.Node){
+        let handler = this.handleArr.find((v)=>{
+            return v.node.uuid == node.uuid;
+        });
+
+        if(handler) {
+            this.hideUI(handler.uiData);
         }
     }
 
@@ -94,92 +127,60 @@ export class UIMgr {
         return this._uiRoot.children[layerIndex] || this._uiRoot;
     }
 
-    public hideAll() {
-        UIController.hideAll();
+    public getUI(uiData: IUIItem): UILoadingHandle {
+        return this.handleArr.find((v)=>{return v.uiData.prefab == uiData.prefab});
     }
 
-    public getUI<T extends UIController>(uiCls): T {
-        let allControllers = (UIController as any)._controllers;
-        for (let i = 0; i < allControllers.length; ++i) {
-            let c = allControllers[i];
-            if (c instanceof uiCls) {
-                return c;
-            }
-        }
-        return null;
-    }
+    public isShowing(uiData: IUIItem): boolean {
+        let find = this.getUI(uiData);
+        if(!find) return false;
 
-    public isShowing(uiCls: any): boolean {
-        let allControllers = (UIController as any)._controllers;
-        for (let i = 0; i < allControllers.length; ++i) {
-            if (allControllers[i] instanceof uiCls) {
-                return true;
-            }
-        }
-        return false;
+        return find.state == UILoadingState.loading || find.state == UILoadingState.show;
     }
 
-    /***
-     * @en show ui by the given parameters.
-     * @zh 显示UI
-     * @param uiCls the class, must inherits from the class `UIController`.
-     * @param cb will be called after ui created.
-     * @param thisArg the this argument for param `cb`.
-     * @returns the instance of `uiCls`
-     *  */
-    public showUI(uiCls: any, cb?: Function, thisArg?: any): any {
-        let bundleName = ModuleContext.getClassModule(uiCls);
-        if (bundleName) {
-            let bundle = cc.assetManager.getBundle(bundleName);
-            if (!bundle) {
-                cc.assetManager.loadBundle(bundleName, null, (err, loadedBundle) => {
-                    if (err) {
-                        console.log(err);
-                    }
-                    else {
-                        this.showUI(uiCls, cb, thisArg);
-                    }
-                });
+    public showUI(uiData: IUIItem) {
+
+        let handle = new UILoadingHandle();
+        handle.state = UILoadingState.loading;
+        handle.uiData = uiData;
+        this.handleArr.push(handle);
+
+        cc.resources.load(uiData.prefab, cc.Prefab, (err, res)=>{
+            if(err){
+                console.log(err);
+                this.showUI(uiData);
                 return;
             }
-        }
 
-        let ui = ModuleContext.createFromModule(uiCls) as UIController;
-        let resArr = ui.getRes() || [];
-        if (typeof (ui.prefab) == 'string') {
-            resArr.push(ui.prefab as never);
-        }
+            if(handle.state == UILoadingState.loading){
+                let node = cc.instantiate(res);
+                let layer = this.getLayerNode(uiData.layer);
+                layer.addChild(node);
+    
+                handle.state = UILoadingState.show;
+                handle.asset = res;
+                handle.node = node;
+                res.addRef();
+            }
+            else{
+                cc.assetManager.releaseAsset(res);
+            }
 
-        let fnLoadAndCreateFromBundle = (bundle: cc.AssetManager.Bundle) => {
-            bundle.load(resArr, (err, data) => {
-                if (err) {
-                    console.log(err);
-                }
-                let node: cc.Node = null;
-                let prefab: cc.Prefab = ui.prefab as cc.Prefab;
-                if (typeof (ui.prefab) == 'string') {
-                    prefab = bundle.get(ui.prefab) as cc.Prefab;
-                }
-                if (prefab) {
-                    node = cc.instantiate(prefab);
-                }
-                else {
-                    //special for empty ui
-                    node = this.createFullScreenNode();
-                }
-
-                let parent = UIMgr.inst.getLayerNode(ui.layer);
-                parent.addChild(node);
-                ui.setup(node);
-                if (cb) {
-                    cb.apply(thisArg, [ui]);
-                }
-            });
-            return ui;
-        }
+        })
 
-        bundleName = bundleName || 'resources';
-        let bundle = cc.assetManager.getBundle(bundleName);
-        return fnLoadAndCreateFromBundle(bundle);
+        return handle;
+    }
+
+    public hideUI(uiData: IUIItem){
+        let index = this.handleArr.findIndex((v)=>{return v.uiData.prefab == uiData.prefab});;
+        if(index==-1) return;
+
+        let find = this.handleArr[index];
+        find.destory();
+        this.handleArr.splice(index, 1);
     }
 }
+
+window['uiMgr'] = function(){ 
+    return UIMgr.inst;
+}

+ 15 - 4
airPlay/assets/Script/Start.ts

@@ -1,5 +1,6 @@
 import bullet from "../game/bullet";
 import { LQCollideSystem } from "../lq_collide_system/lq_collide_system";
+import { UIList } from "./Core/Ui/UIDef";
 import { UILayerNames, UILayers } from "./Core/Ui/UILayers";
 import { UIMgr } from "./Core/Ui/UIMgr";
 
@@ -11,11 +12,12 @@ export default class Start extends cc.Component {
     /*===========================自动绑定组件开始===========================*/
 	/*自动生成*/
     @property({type:cc.Node, displayName:""})
-    private $wallLayer_node:cc.Node = null;
-	/*自动生成*/
-    @property({type:cc.Node, displayName:""})
     private $bulletLayer_node:cc.Node = null;
 
+    /*自动生成*/
+    @property({type:cc.Node, displayName:""})
+    private $ui_node:cc.Node = null;
+    
 	/*===========================自动绑定组件结束===========================*/
 
     /*===========================自动生成按钮事件开始==========================*/
@@ -28,8 +30,17 @@ export default class Start extends cc.Component {
 
     protected onLoad(): void {
         Start.inst = this;
-        UIMgr.inst.setup(new cc.Node(), UILayerNames.length, UILayerNames);
+        // let node = new cc.Node()
+
+        UIMgr.inst.setup(this.$ui_node, UILayerNames.length, UILayerNames);
         LQCollideSystem.is_enable = true;
+
+        // UIMgr.inst.showUI(UIList.loading);
+        // UIMgr.inst.showUI(UIList.loading);
+
+        // setTimeout(()=>{
+        //     UIMgr.inst.hideUI(UIList.loading);
+        // }, 10000)
     }
 
     createPlayerBullet(pos: cc.Vec2){

+ 4 - 1
airPlay/assets/game/Rocker.ts

@@ -65,7 +65,10 @@ export default class Rocker extends cc.Component {
         if(this.temp.id != event.getID()) return;
 
         let offset = event.getLocation().sub(event.getStartLocation());
-        let angle = cc.v2(0,1).signAngle(offset) / Math.PI * 180;
+        let angle = 0;
+        if(offset.x != 0 || offset.y != 0) {
+            angle = cc.v2(0,1).signAngle(offset) / Math.PI * 180;
+        }
         this.$arrow_node.angle = Math.round(angle * 100) / 100;
         let nOffset = offset.normalize();
         if(offset.mag() > 85) {

+ 1 - 1
airPlay/assets/game/bullet.ts

@@ -26,7 +26,7 @@ export default class bullet extends LQCollide {
     }
 
     public on_enter(collide: LQCollide): void {
-        cc.log(collide);
+        // cc.log(collide);
         this.node.destroy();
     }
 

+ 1 - 1
airPlay/assets/lq_collide_system/lq_collide_config.ts

@@ -4,7 +4,7 @@ export enum LQCollideInfoList {
 
 export class LQCollideConfig {
     public static switch_auto_run: boolean = true;
-    public static switch_print_log: boolean = true;
+    public static switch_print_log: boolean = false;
     public static switch_quad_tree: boolean = true;
     public static max_node_len: number = 10;
     public static per_frame: number = 60;

+ 21 - 0
airPlay/assets/resources.meta

@@ -0,0 +1,21 @@
+{
+  "ver": "1.1.3",
+  "uuid": "2e32138e-6b07-47f6-81db-5c9343fcf7f7",
+  "importer": "folder",
+  "isBundle": true,
+  "bundleName": "resources",
+  "priority": 8,
+  "compressionType": {
+    "web-mobile": "default"
+  },
+  "optimizeHotUpdate": {
+    "web-mobile": false
+  },
+  "inlineSpriteFrames": {
+    "web-mobile": true
+  },
+  "isRemoteBundle": {
+    "web-mobile": false
+  },
+  "subMetas": {}
+}

+ 392 - 0
airPlay/assets/resources/loading.prefab

@@ -0,0 +1,392 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "loading",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 6
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 9
+      },
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 12
+    },
+    "_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": [
+        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": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "singleColor",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 150,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 87,
+      "g": 82,
+      "b": 82,
+      "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": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "410fb916-8721-4663-bab8-34397391ace7"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_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": 300,
+    "_originalHeight": 60,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "84UnZSNPJPlazgR0F0XQIj",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 8
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 153.34,
+      "height": 50.4
+    },
+    "_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": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "加载中...",
+    "_N$string": "加载中...",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "11VMR6wwVPyrd4cKw6LS6l",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_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": ""
+  },
+  {
+    "__type__": "cc.BlockInputEvents",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "61057L8SgdKBL6yugliubUV",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 9 - 0
airPlay/assets/resources/loading.prefab.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.3.2",
+  "uuid": "0bbac754-965c-4958-a052-ea708c2b3da1",
+  "importer": "prefab",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 13 - 0
airPlay/assets/resources/loading.ts

@@ -0,0 +1,13 @@
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class loading extends cc.Component {
+
+    /*===========================自动绑定组件开始===========================*/
+	/*===========================自动绑定组件结束===========================*/
+
+    /*===========================自动生成按钮事件开始==========================*/
+
+	/*===========================自动生成按钮事件结束==========================*/
+
+}

+ 10 - 0
airPlay/assets/resources/loading.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "610572fc-4a07-4a04-beb2-ba0962b9b515",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
airPlay/assets/ui.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "8d916dbe-08df-4d91-bb97-b9226385f0d2",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 4 - 0
airPlay/assets/ui/loadingCtl.ts

@@ -0,0 +1,4 @@
+import { UIController } from "../Script/Core/Ui/UIController";
+
+export class LoadingCtl extends UIController {
+}

+ 10 - 0
airPlay/assets/ui/loadingCtl.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "2e1d0db4-0c9f-4e2f-bbb0-1c110658fefd",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 1
airPlay/settings/collide_system_cfg.json

@@ -1 +1 @@
-{"group_arr":[{"name":"default","id":1,"arr":[1,1]},{"name":"role","id":2,"arr":[6,5,4]},{"name":"role_bullet","id":3,"arr":[6,4]},{"name":"enemy","id":4,"arr":[2,3]},{"name":"enemy_bullet","id":5,"arr":[2]},{"name":"prop","id":6,"arr":[2,3]}],"switch_auto_run":true,"switch_print_log":true,"switch_quad_tree":true,"max_node_len":10,"max_node_level":4,"active_area_x":0,"active_area_y":0,"active_area_width":1000,"active_area_height":1000,"per_frame":60}
+{"group_arr":[{"name":"default","id":1,"arr":[1,1]},{"name":"role","id":2,"arr":[6,5,4]},{"name":"role_bullet","id":3,"arr":[6,4]},{"name":"enemy","id":4,"arr":[2,3]},{"name":"enemy_bullet","id":5,"arr":[2]},{"name":"prop","id":6,"arr":[2,3]}],"switch_auto_run":true,"switch_print_log":false,"switch_quad_tree":true,"max_node_len":10,"max_node_level":4,"active_area_x":0,"active_area_y":0,"active_area_width":1000,"active_area_height":1000,"per_frame":60}