zhoupeng hace 1 año
padre
commit
2bc0d4cedf

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

@@ -115,7 +115,7 @@ export default class MonsterFactory extends GameLogic {
                 ani.addClip(this.aniClip, "path");
                 if(CC_EDITOR){
                     // @ts-ignore
-                    node._objFlags |= cc.Object.Flags.DontSave | cc.Object.Flags.LockedInEditor;
+                    node._objFlags |= cc.Object.Flags.DontSave | cc.Object.Flags.LockedInEditor | cc.Object.Flags.HideInHierarchy;
                 }
 
                 node.active = false;

+ 12 - 6
airPlay/assets/Script/game/update/logic.ts

@@ -16,19 +16,25 @@ export class GameLogicMgr {
 
     switch(){
         this.isGamePause = !this.isGamePause;
+
+
+        //@ts-ignore
+        dragonBones.timeScale = this.isGamePause ? 0 : 1;
     }
 
     init(){
         //@ts-ignore
         let aniMgr = cc.director.getAnimationManager();
-
-        aniMgr._oldUpdate = aniMgr.update;
-        aniMgr.update = function(dt){
-            if(GameLogicMgr.inst.isGamePause) return;
-            aniMgr._oldUpdate(dt);
+        
+        if(!CC_EDITOR){
+            aniMgr._oldUpdate = aniMgr.update;
+            aniMgr.update = function(dt){
+                if(GameLogicMgr.inst.isGamePause) return;
+                aniMgr._oldUpdate(dt);
+            }
         }
     }
-}
+};
 
 export class GameLogic extends cc.Component {
     logicId:number;

+ 98 - 1
airPlay/assets/resources/level/level-demo.prefab

@@ -22,12 +22,15 @@
       },
       {
         "__id__": 10
+      },
+      {
+        "__id__": 13
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 13
+      "__id__": 16
     },
     "_opacity": 255,
     "_color": {
@@ -420,6 +423,100 @@
     "fileId": "22L9FvSKBAj5yElbtBkVq0",
     "sync": false
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Node",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 14
+      }
+    ],
+    "_prefab": {
+      "__id__": 15
+    },
+    "_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": [
+        0,
+        8.369,
+        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__": "4d3fcHTBlpMkp4oVmYBBuEb",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 13
+    },
+    "_enabled": true,
+    "monster": {
+      "__uuid__": "028a46d4-54b8-45e5-a0ba-b876325cef91"
+    },
+    "aniClip": {
+      "__uuid__": "15bf50ba-c2eb-49af-a8ab-4b68a23488d4"
+    },
+    "_num": 10,
+    "_time": 0.5,
+    "_delay": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "22nKmjw1JNSKHsN3gya0dX",
+    "sync": false
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {

+ 101 - 4
airPlay/assets/resources/level/level3.prefab

@@ -24,11 +24,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 19
+        "__id__": 22
       }
     ],
     "_prefab": {
-      "__id__": 20
+      "__id__": 23
     },
     "_opacity": 255,
     "_color": {
@@ -90,16 +90,19 @@
       },
       {
         "__id__": 14
+      },
+      {
+        "__id__": 17
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 17
+        "__id__": 20
       }
     ],
     "_prefab": {
-      "__id__": 18
+      "__id__": 21
     },
     "_opacity": 255,
     "_color": {
@@ -628,6 +631,100 @@
     "fileId": "5cORN15V1HdKQ/jbgGsgz4",
     "sync": false
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "pathPlay",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 18
+      }
+    ],
+    "_prefab": {
+      "__id__": 19
+    },
+    "_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": [
+        74.949,
+        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__": "4d3fcHTBlpMkp4oVmYBBuEb",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 17
+    },
+    "_enabled": true,
+    "monster": {
+      "__uuid__": "028a46d4-54b8-45e5-a0ba-b876325cef91"
+    },
+    "aniClip": {
+      "__uuid__": "e3ebd73a-0310-4b77-a53f-b172447f8338"
+    },
+    "_num": 7,
+    "_time": 0.2,
+    "_delay": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "067lK9/WlCP6QmKdzoqYTx",
+    "sync": false
+  },
   {
     "__type__": "cc.Widget",
     "_name": "",