woso_javan 1 ماه پیش
والد
کامیت
075d6b08da

BIN
assets/module_aliens/FBX/Model/gun donghua.fbx


+ 207 - 0
assets/module_aliens/FBX/Model/gun donghua.fbx.meta

@@ -0,0 +1,207 @@
+{
+  "ver": "2.3.12",
+  "importer": "fbx",
+  "imported": true,
+  "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333",
+  "files": [
+    "__original-animation-0.cconb"
+  ],
+  "subMetas": {
+    "41ac8": {
+      "importer": "gltf-mesh",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@41ac8",
+      "displayName": "",
+      "id": "41ac8",
+      "name": "Cube.001.mesh",
+      "userData": {
+        "gltfIndex": 0,
+        "triangleCount": 1508
+      },
+      "ver": "1.1.1",
+      "imported": true,
+      "files": [
+        ".bin",
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "49b7c": {
+      "importer": "gltf-mesh",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@49b7c",
+      "displayName": "",
+      "id": "49b7c",
+      "name": "柱体.mesh",
+      "userData": {
+        "gltfIndex": 1,
+        "triangleCount": 140
+      },
+      "ver": "1.1.1",
+      "imported": true,
+      "files": [
+        ".bin",
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "cbc2b": {
+      "importer": "gltf-animation",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@cbc2b",
+      "displayName": "",
+      "id": "cbc2b",
+      "name": "Scene.animation",
+      "userData": {
+        "gltfIndex": 0,
+        "wrapMode": 0,
+        "sample": 30,
+        "span": {
+          "from": 0,
+          "to": 1
+        },
+        "events": []
+      },
+      "ver": "1.0.17",
+      "imported": true,
+      "files": [
+        ".cconb"
+      ],
+      "subMetas": {}
+    },
+    "48b02": {
+      "importer": "gltf-embeded-image",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@48b02",
+      "displayName": "",
+      "id": "48b02",
+      "name": "base_color_texture.image",
+      "userData": {
+        "gltfIndex": 0,
+        "fixAlphaTransparencyArtifacts": true,
+        "hasAlpha": true,
+        "type": "texture"
+      },
+      "ver": "1.0.3",
+      "imported": true,
+      "files": [
+        ".json",
+        ".png"
+      ],
+      "subMetas": {}
+    },
+    "7d6ab": {
+      "importer": "texture",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@7d6ab",
+      "displayName": "",
+      "id": "7d6ab",
+      "name": "base_color_texture.texture",
+      "userData": {
+        "wrapModeS": "repeat",
+        "wrapModeT": "repeat",
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0,
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "e444abad-cc59-49e7-b1d3-3991fb889333@48b02"
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "dd992": {
+      "importer": "gltf-material",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@dd992",
+      "displayName": "",
+      "id": "dd992",
+      "name": "材质.001.material",
+      "userData": {
+        "gltfIndex": 0
+      },
+      "ver": "1.0.14",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "281d6": {
+      "importer": "gltf-scene",
+      "uuid": "e444abad-cc59-49e7-b1d3-3991fb889333@281d6",
+      "displayName": "",
+      "id": "281d6",
+      "name": "gun donghua.prefab",
+      "userData": {
+        "gltfIndex": 0
+      },
+      "ver": "1.0.14",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "imageMetas": [
+      {
+        "name": "base_color_texture",
+        "uri": "e444abad-cc59-49e7-b1d3-3991fb889333@48b02"
+      }
+    ],
+    "fbx": {
+      "smartMaterialEnabled": true
+    },
+    "animationImportSettings": [
+      {
+        "name": "Scene",
+        "duration": 1,
+        "fps": 30,
+        "splits": [
+          {
+            "name": "Scene",
+            "from": 0,
+            "to": 1,
+            "wrapMode": 0,
+            "previousId": "cbc2b"
+          }
+        ]
+      }
+    ],
+    "redirect": "e444abad-cc59-49e7-b1d3-3991fb889333@281d6",
+    "lods": {
+      "enable": false,
+      "hasBuiltinLOD": false,
+      "options": [
+        {
+          "screenRatio": 0.25,
+          "faceCount": 1
+        },
+        {
+          "screenRatio": 0.125,
+          "faceCount": 0.25
+        },
+        {
+          "screenRatio": 0.01,
+          "faceCount": 0.1
+        }
+      ]
+    },
+    "assetFinder": {
+      "meshes": [
+        "e444abad-cc59-49e7-b1d3-3991fb889333@41ac8",
+        "e444abad-cc59-49e7-b1d3-3991fb889333@49b7c"
+      ],
+      "skeletons": [],
+      "textures": [
+        "e444abad-cc59-49e7-b1d3-3991fb889333@7d6ab"
+      ],
+      "materials": [
+        "e444abad-cc59-49e7-b1d3-3991fb889333@dd992"
+      ],
+      "scenes": [
+        "e444abad-cc59-49e7-b1d3-3991fb889333@281d6"
+      ]
+    }
+  }
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 467 - 129
assets/module_aliens/Prefabs/Levels/level_1.prefab


+ 0 - 188
assets/module_aliens/Prefabs/gun.prefab

@@ -1,188 +0,0 @@
-[
-  {
-    "__type__": "cc.Prefab",
-    "_name": "gun",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_native": "",
-    "data": {
-      "__id__": 1
-    },
-    "optimizationPolicy": 0,
-    "persistent": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "gun",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": null,
-    "_children": [
-      {
-        "__id__": 2
-      }
-    ],
-    "_active": true,
-    "_components": [],
-    "_prefab": {
-      "__id__": 10
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 1073741824,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Node",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_prefab": {
-      "__id__": 3
-    },
-    "__editorExtras__": {}
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 2
-    },
-    "asset": {
-      "__uuid__": "d30a94f2-c97c-43cb-81dc-2f4887653630@551de",
-      "__expectedType__": "cc.Prefab"
-    },
-    "fileId": "cb63m0/QpWTrofIkOjI5qa",
-    "instance": {
-      "__id__": 4
-    },
-    "targetOverrides": null
-  },
-  {
-    "__type__": "cc.PrefabInstance",
-    "fileId": "34hYYkR0VEsbKlk9ci02LQ",
-    "prefabRootNode": {
-      "__id__": 1
-    },
-    "mountedChildren": [],
-    "mountedComponents": [],
-    "propertyOverrides": [
-      {
-        "__id__": 5
-      },
-      {
-        "__id__": 7
-      },
-      {
-        "__id__": 8
-      },
-      {
-        "__id__": 9
-      }
-    ],
-    "removedComponents": []
-  },
-  {
-    "__type__": "CCPropertyOverrideInfo",
-    "targetInfo": {
-      "__id__": 6
-    },
-    "propertyPath": [
-      "_name"
-    ],
-    "value": "手枪"
-  },
-  {
-    "__type__": "cc.TargetInfo",
-    "localID": [
-      "cb63m0/QpWTrofIkOjI5qa"
-    ]
-  },
-  {
-    "__type__": "CCPropertyOverrideInfo",
-    "targetInfo": {
-      "__id__": 6
-    },
-    "propertyPath": [
-      "_lpos"
-    ],
-    "value": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    }
-  },
-  {
-    "__type__": "CCPropertyOverrideInfo",
-    "targetInfo": {
-      "__id__": 6
-    },
-    "propertyPath": [
-      "_lrot"
-    ],
-    "value": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": -0.3826834323650898,
-      "z": 0,
-      "w": 0.9238795325112867
-    }
-  },
-  {
-    "__type__": "CCPropertyOverrideInfo",
-    "targetInfo": {
-      "__id__": 6
-    },
-    "propertyPath": [
-      "_euler"
-    ],
-    "value": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": -45,
-      "z": 0
-    }
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "c46/YsCPVOJYA4mWEpNYRx",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": [
-      {
-        "__id__": 2
-      }
-    ]
-  }
-]

+ 0 - 13
assets/module_aliens/Prefabs/gun.prefab.meta

@@ -1,13 +0,0 @@
-{
-  "ver": "1.1.50",
-  "importer": "prefab",
-  "imported": true,
-  "uuid": "6a3f318c-4d9d-46e4-b3a7-60451b683572",
-  "files": [
-    ".json"
-  ],
-  "subMetas": {},
-  "userData": {
-    "syncNodeName": "gun"
-  }
-}

+ 23 - 0
assets/module_aliens/Script/Components/GunComponent.ts

@@ -0,0 +1,23 @@
+import { _decorator, Animation, AnimationClip, AnimationState, Component, Node } from 'cc';
+import { EventDispatcher } from 'db://assets/core_tgx/easy_ui_framework/EventDispatcher';
+import { GameEvent } from '../Enum/GameEvent';
+const { ccclass, property } = _decorator;
+
+@ccclass('GunComponent')
+export class GunComponent extends Component {
+
+    gunAnimation: Animation = null!;
+    
+    protected onLoad(): void {
+        this.gunAnimation = this.node.getComponent(Animation)!;
+    }
+    start() {
+        EventDispatcher.instance.on(GameEvent.EVENT_PLAY_GUN_ANIMATION,this.playGunAnimation,this);
+    }
+
+    playGunAnimation(){
+        this.gunAnimation.play();
+    }
+}
+
+

+ 9 - 0
assets/module_aliens/Script/Components/GunComponent.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "2d900d7b-d2bf-4869-8704-06fc8e0eb804",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 3 - 0
assets/module_aliens/Script/Enum/GameEvent.ts

@@ -20,6 +20,9 @@ export class GameEvent {
     /** 游戏倒计时开始*/
     static readonly EVENT_GAME_COUNTDOWN_START = 'EVENT_GAME_COUNTDOWN_START';
 
+    /** 播放开枪动画*/
+    static readonly EVENT_PLAY_GUN_ANIMATION = 'EVENT_PLAY_GUN_ANIMATION';
+
     /** 瞄准镜头*/
     static readonly EVENT_CAMERA_AIM = 'EVENT_CAMERA_AIM';
 

+ 1 - 0
assets/module_aliens/Script/LevelAction.ts

@@ -182,6 +182,7 @@ export class LevelAction extends Component {
             }
         }
 
+        EventDispatcher.instance.emit(GameEvent.EVENT_PLAY_GUN_ANIMATION);
         LevelManager.instance.levelModel.shootCount++;
     }
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است