From 6a185a23616e1fbede978334051550e0ec0a27c3 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 28 May 2025 16:59:59 +0800 Subject: [PATCH] dd --- assets/resources/game/heros/hart.prefab | 1730 +++++++++++++++++ assets/resources/game/heros/hart.prefab.meta | 13 + assets/script/game/common/config/GameEvent.ts | 4 +- assets/script/game/hero/BossModelComp.ts | 12 + assets/script/game/hero/BossModelComp.ts.meta | 1 + assets/script/game/hero/BuffComp.ts | 3 + assets/script/game/hero/HartModelComp.ts | 15 + assets/script/game/hero/HartModelComp.ts.meta | 1 + assets/script/game/hero/Hero.ts | 34 +- assets/script/game/hero/HeroViewComp.ts | 5 + assets/script/game/map/MissionComp.ts | 4 + assets/script/game/map/MissionHeroComp.ts | 11 +- 12 files changed, 1824 insertions(+), 9 deletions(-) create mode 100644 assets/resources/game/heros/hart.prefab create mode 100644 assets/resources/game/heros/hart.prefab.meta create mode 100644 assets/script/game/hero/BossModelComp.ts create mode 100644 assets/script/game/hero/BossModelComp.ts.meta create mode 100644 assets/script/game/hero/HartModelComp.ts create mode 100644 assets/script/game/hero/HartModelComp.ts.meta diff --git a/assets/resources/game/heros/hart.prefab b/assets/resources/game/heros/hart.prefab new file mode 100644 index 00000000..5c2d0858 --- /dev/null +++ b/assets/resources/game/heros/hart.prefab @@ -0,0 +1,1730 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "hart", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "hart", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 14 + }, + { + "__id__": 23 + }, + { + "__id__": 31 + }, + { + "__id__": 43 + }, + { + "__id__": 62 + }, + { + "__id__": 71 + }, + { + "__id__": 80 + }, + { + "__id__": 88 + } + ], + "_active": true, + "_components": [ + { + "__id__": 97 + }, + { + "__id__": 99 + }, + { + "__id__": 101 + }, + { + "__id__": 103 + }, + { + "__id__": 105 + }, + { + "__id__": 107 + } + ], + "_prefab": { + "__id__": 109 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -0.041, + "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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "shadow", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 48, + "height": 10 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a62pNH7WJL7Y2J76xlh6E5" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 190 + }, + "_spriteFrame": { + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@34d88", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c7Ljbr2uBPrIAr55WaWcYz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "51ZjCtSAdKQ7Bnocj2kgu0", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "GradeIcon_Gem_On", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 13 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 37, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1.7, + "y": 1.7, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 10 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 29, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "76AE0O7JVL64YSkXpcAPOl" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@2416d", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "37STtbmGtKNI/om6qLySQ1" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fa2VPJt2RGDLKpxzKalR8c", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 15 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 14 + }, + "asset": { + "__uuid__": "198e9c93-3ac9-4564-9d0e-63c9836e509a", + "__expectedType__": "cc.Prefab" + }, + "fileId": "54R/aYBglLI4Jn5pm++Jx8", + "instance": { + "__id__": 16 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "cdIK+ocxBJRLNeMROksdDi", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 17 + }, + { + "__id__": 19 + }, + { + "__id__": 20 + }, + { + "__id__": 21 + }, + { + "__id__": 22 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_name" + ], + "value": "max" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "54R/aYBglLI4Jn5pm++Jx8" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": -4.526, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.Node", + "_name": "anm", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 24 + }, + { + "__id__": 26 + }, + { + "__id__": 28 + } + ], + "_prefab": { + "__id__": 30 + }, + "_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": 0.3, + "y": 0.3, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 23 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 260, + "height": 378.54998779296875 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.515923074575571, + "y": 0.246783783334943 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9eaEPPEkdKYYfWIxgJ1KbU" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 23 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": { + "__uuid__": "ff279905-9cc6-4cd0-a65f-e407867222b6", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "default", + "defaultAnimation": "Idle", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": 0, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "54k9q4iztE15bdAWnFOCpS" + }, + { + "__type__": "4ba4awuz8tF34rq4TkZ9W1S", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 23 + }, + "_enabled": true, + "__prefab": { + "__id__": 29 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "569pdLaDNB6qtHi4mnEa2p" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4aKyovCOhDJpr23Of35+5a", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 32 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 31 + }, + "asset": { + "__uuid__": "e1b8a315-ece3-41a2-941e-a66861753f1b", + "__expectedType__": "cc.Prefab" + }, + "fileId": "c46/YsCPVOJYA4mWEpNYRx", + "instance": { + "__id__": 33 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "3a1pwLAh1NkYnlDVrAFcnS", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 34 + }, + { + "__id__": 36 + }, + { + "__id__": 37 + }, + { + "__id__": 38 + }, + { + "__id__": 39 + }, + { + "__id__": 40 + }, + { + "__id__": 42 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_name" + ], + "value": "shielded" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "c46/YsCPVOJYA4mWEpNYRx" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -0.057, + "y": -39.46, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 41 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 120, + "height": 100 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "63NP9yq3hEUKD/OZZZ5t7x" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 35 + }, + "propertyPath": [ + "_lscale" + ], + "value": { + "__type__": "cc.Vec3", + "x": 1.2, + "y": 1.1, + "z": 1 + } + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 44 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 43 + }, + "asset": { + "__uuid__": "50c3d5e4-49f8-4bd7-a15b-cda359a0ae5c", + "__expectedType__": "cc.Prefab" + }, + "fileId": "5fqU0L3/FOhKaco5UkHuWT", + "instance": { + "__id__": 45 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "69IAw7dThHvIlVtTfXOVMZ", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 46 + }, + { + "__id__": 48 + }, + { + "__id__": 49 + }, + { + "__id__": 50 + }, + { + "__id__": 51 + }, + { + "__id__": 53 + }, + { + "__id__": 54 + }, + { + "__id__": 56 + }, + { + "__id__": 58 + }, + { + "__id__": 60 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_name" + ], + "value": "top" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "5fqU0L3/FOhKaco5UkHuWT" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 135.337, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 52 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 10.531, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "16MuhUBUpB2ZdBTYflEf1n" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 47 + }, + "propertyPath": [ + "_lscale" + ], + "value": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 55 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "02WqvhZKlNPKIWBWcAe/Nq" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 57 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "e5ISowRRRJzZCd3OkOSUwA" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 59 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "95HWumX1dAXKrLjkPNDo8g" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 61 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "47xTNtjzxH8ZggdtaB0J/Z" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 63 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 62 + }, + "asset": { + "__uuid__": "5b4ca49e-0f12-4478-b56d-bf8198b36b90", + "__expectedType__": "cc.Prefab" + }, + "fileId": "0d6ZXmA5dHkZxoGONDL2sE", + "instance": { + "__id__": 64 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "fe79INE+JI1Jy2Hu0iKLMn", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 65 + }, + { + "__id__": 67 + }, + { + "__id__": 68 + }, + { + "__id__": 69 + }, + { + "__id__": 70 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 66 + }, + "propertyPath": [ + "_name" + ], + "value": "tooltip" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "0d6ZXmA5dHkZxoGONDL2sE" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 66 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 4.65, + "y": 129.718, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 66 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 66 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 66 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 72 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 71 + }, + "asset": { + "__uuid__": "ae4493bd-cbcc-4392-921c-3e2b0fcd5338", + "__expectedType__": "cc.Prefab" + }, + "fileId": "91yoyAQGNDm5ziI7NUChZ+", + "instance": { + "__id__": 73 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "08n1IzuupL3YNn2/tFvc8M", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 74 + }, + { + "__id__": 76 + }, + { + "__id__": 77 + }, + { + "__id__": 78 + }, + { + "__id__": 79 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_name" + ], + "value": "up" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "91yoyAQGNDm5ziI7NUChZ+" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 4.302, + "y": 45.887, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 75 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 81 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 80 + }, + "asset": { + "__uuid__": "afb84e4d-b478-4ab6-8f14-4f69d7a2c57f", + "__expectedType__": "cc.Prefab" + }, + "fileId": "733PKzwANLyJWD2ume4u5f", + "instance": { + "__id__": 82 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "bberDW5uVI9LIIaIMnA/2E", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 83 + }, + { + "__id__": 85 + }, + { + "__id__": 86 + }, + { + "__id__": 87 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 84 + }, + "propertyPath": [ + "_name" + ], + "value": "wind" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "733PKzwANLyJWD2ume4u5f" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 84 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 84 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 84 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_prefab": { + "__id__": 89 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 88 + }, + "asset": { + "__uuid__": "3899fa6a-77a8-4809-b34b-64e0daa5674c", + "__expectedType__": "cc.Prefab" + }, + "fileId": "65v9q/98dMjafRlb094Ctr", + "instance": { + "__id__": 90 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "e2pEwe/wJPEp3j+VexsgH9", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 91 + }, + { + "__id__": 93 + }, + { + "__id__": 94 + }, + { + "__id__": 95 + }, + { + "__id__": 96 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 92 + }, + "propertyPath": [ + "_name" + ], + "value": "buff" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "65v9q/98dMjafRlb094Ctr" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 92 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 92 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 92 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 92 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 98 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 80, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "a0379fmhvBHcbNcBF/l43O8", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 100 + }, + "anm": { + "__id__": 28 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "73PcRpG0xKxJpIRC2zbI/o" + }, + { + "__type__": "873f8d+SolMEo8DiTTxZRh4", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" + }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 104 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "654wWWbWpMeYe/ywRBGTMP" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 106 + }, + "enabledContactListener": true, + "bullet": false, + "awakeOnLoad": true, + "_group": 4, + "_type": 1, + "_allowSleep": false, + "_gravityScale": 1, + "_linearDamping": 0, + "_angularDamping": 0, + "_linearVelocity": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_angularVelocity": 0, + "_fixedRotation": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "eaHlLf7adGNZGf1kwqNB/X" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 108 + }, + "tag": 0, + "_group": 4, + "_density": 1, + "_sensor": true, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": -1.1, + "y": 33.8 + }, + "_size": { + "__type__": "cc.Size", + "width": 48.6, + "height": 67.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e2W2S9tbFNgrjc8vdk08/N" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": [ + { + "__id__": 88 + }, + { + "__id__": 80 + }, + { + "__id__": 71 + }, + { + "__id__": 62 + }, + { + "__id__": 43 + }, + { + "__id__": 31 + }, + { + "__id__": 14 + } + ] + } +] \ No newline at end of file diff --git a/assets/resources/game/heros/hart.prefab.meta b/assets/resources/game/heros/hart.prefab.meta new file mode 100644 index 00000000..d4b1a894 --- /dev/null +++ b/assets/resources/game/heros/hart.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "0828a791-6a59-42fe-8703-bcf1b96d8980", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "hart" + } +} diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index eb083609..12157179 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -21,5 +21,7 @@ export enum GameEvent { UseSkillCard = "UseSkillCard", CallHero = "CallHero", MissionSkill = "MissionSkill", - + MissionLoss = "MissionLoss", + MissionWin = "MissionWin", + } \ No newline at end of file diff --git a/assets/script/game/hero/BossModelComp.ts b/assets/script/game/hero/BossModelComp.ts new file mode 100644 index 00000000..5e82b695 --- /dev/null +++ b/assets/script/game/hero/BossModelComp.ts @@ -0,0 +1,12 @@ +import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; + +/** + * 角色属性数据 + */ +@ecs.register('BossModel') +export class BossModelComp extends ecs.Comp { + + reset() { + + } +} diff --git a/assets/script/game/hero/BossModelComp.ts.meta b/assets/script/game/hero/BossModelComp.ts.meta new file mode 100644 index 00000000..c5fbb3bb --- /dev/null +++ b/assets/script/game/hero/BossModelComp.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"fa6157bf-a254-44af-a0c0-5d16f12cd761","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/hero/BuffComp.ts b/assets/script/game/hero/BuffComp.ts index 61a024d8..bb049b11 100644 --- a/assets/script/game/hero/BuffComp.ts +++ b/assets/script/game/hero/BuffComp.ts @@ -42,6 +42,9 @@ export class BuffComp extends Component { this.top_node.getChildByName("lv").active=(this.node.getComponent(HeroViewComp).fac == 0 ? true : false) // this.top_node.getChildByName("hp").active=(this.node.getComponent(HeroViewComp).fac == 1 ? true : false) this.top_node.getChildByName("sboss").active=this.node.getComponent(HeroViewComp).is_boss + if(this.node.getComponent(HeroViewComp).hero_uuid == 9999){ + this.top_node.getChildByName("lv").active=false + } this.top_node.getChildByName("lv").getChildByName("lv").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).lv.toFixed(0) this.top_node.getChildByName("ihp").getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).hp.toFixed(0) this.top_node.getChildByName("iap").getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).ap.toFixed(0) diff --git a/assets/script/game/hero/HartModelComp.ts b/assets/script/game/hero/HartModelComp.ts new file mode 100644 index 00000000..d0b97b31 --- /dev/null +++ b/assets/script/game/hero/HartModelComp.ts @@ -0,0 +1,15 @@ +import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; +import { HeroViewComp } from "./HeroViewComp"; + +/** + * 角色属性数据 + */ +@ecs.register('HartModel') +export class HartModelComp extends ecs.Comp { + onLoad(){ + console.log("HartModel加载",this) + } + reset() { + + } +} diff --git a/assets/script/game/hero/HartModelComp.ts.meta b/assets/script/game/hero/HartModelComp.ts.meta new file mode 100644 index 00000000..c5bf222a --- /dev/null +++ b/assets/script/game/hero/HartModelComp.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"a32cd4cd-7797-4ef0-bf2d-bd3168fbd0cc","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 5fcf8207..623a0793 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -8,6 +8,7 @@ import { BoxSet } from "../common/config/BoxSet"; import { HeroInfo } from "../common/config/heroSet"; import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp"; import { HeroSkillsComp } from "../skill/heroSkillsComp"; +import { HartModelComp } from "./HartModelComp"; /** 角色实体 */ @ecs.register(`Hero`) @@ -27,7 +28,36 @@ export class Hero extends ecs.Entity { this.remove(HeroViewComp); super.destroy(); } - + hart_load() { + console.log("主体加载") + let box_group=BoxSet.HERO + var path = "game/heros/hart"; + var prefab: Prefab = oops.res.get(path, Prefab)!; + var node = instantiate(prefab); + var scene = smc.map.MapView.scene; + node.parent = scene.entityLayer!.node! + let pos=v3(-277,150,0) + node.setPosition(pos) + var hv = node.getComponent(HeroViewComp)!; + hv.scale = 1; + hv.fac = 0; + hv.type = 0; + hv.box_group = box_group; + hv.hero_uuid= 9999; + hv.hero_name= "主体"; + hv.speed =hv.ospeed = 0; + hv.dis = 0; + hv.hp= hv.hp_max =5; + hv.ap = 0; + hv.lv=0 + hv.cd = 9999 + hv.ap_u=0 + hv.ap_ur=0 + hv.hp_up=0 + hv.atk_skill=0 + this.add(hv); + this.add(HartModelComp) + } /** 加载角色 */ load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,info:any={ap:0,hp:0},fight_pos:number=0) { console.log("英雄加载:",uuid,pos,scale,info) @@ -63,8 +93,6 @@ export class Hero extends ecs.Entity { const move = this.get(BattleMoveComp); move.direction = 1; // 向右移动 move.targetX = 800; // 右边界' - - oops.message.dispatchEvent("hero_load",this) } diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 58491c2e..94233f81 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -12,6 +12,8 @@ import { HeroSet } from "../common/config/heroSet"; import { BuffComp } from "./BuffComp"; import { getMonsterDrops, MonsterType } from "../common/config/RewardSet"; import { HeroSkillsComp } from "../skill/heroSkillsComp"; +import { oops } from "db://oops-framework/core/Oops"; +import { GameEvent } from "../common/config/GameEvent"; const { ccclass, property } = _decorator; @@ -287,6 +289,9 @@ export class HeroViewComp extends CCComp { dead(){ this.BUFFCOMP.dead() this.to_drop() + if(this.hero_uuid == 9999){ + oops.message.dispatchEvent(GameEvent.MissionLoss,this) + } } //掉落物品 diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 6b699bc7..da4de61a 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -10,6 +10,8 @@ import { CardControllerComp } from "./CardController"; import { GameEvent } from "../common/config/GameEvent"; import { HeroSkillsComp } from "../skill/heroSkillsComp"; import { HeroViewComp } from "../hero/HeroViewComp"; +import { Hero } from "../hero/Hero"; +import { HartModelComp } from "../hero/HartModelComp"; const { ccclass, property } = _decorator; /** 视图层对象 */ @@ -111,6 +113,8 @@ export class MissionComp extends CCComp { hp:0,//血量 ap:0,//攻击 } + let hero = ecs.getEntity(Hero); + hero.hart_load() } diff --git a/assets/script/game/map/MissionHeroComp.ts b/assets/script/game/map/MissionHeroComp.ts index 8a9a8cad..22ca1ff9 100644 --- a/assets/script/game/map/MissionHeroComp.ts +++ b/assets/script/game/map/MissionHeroComp.ts @@ -12,6 +12,7 @@ import { HeroModelComp } from "../hero/HeroModelComp"; import { HeroViewComp } from "../hero/HeroViewComp"; import { oops } from "db://oops-framework/core/Oops"; import { FightSet } from "../common/config/Mission"; +import { HartModelComp } from "../hero/HartModelComp"; const { ccclass, property } = _decorator; @@ -21,9 +22,9 @@ const { ccclass, property } = _decorator; export class MissionHeroCompComp extends CCComp { timer:Timer=new Timer(2) start_pos:any={ - 0:{pos:v3(-150,135,0),has:false}, - 1:{pos:v3(-270,205,0),has:false}, - 2:{pos:v3(-270,65,0),has:false}, + 0:{pos:v3(-50,135,0),has:false}, + 1:{pos:v3(-170,205,0),has:false}, + 2:{pos:v3(-170,65,0),has:false}, } current_hero_uuid:number=0 onLoad(){ @@ -57,7 +58,7 @@ export class MissionHeroCompComp extends CCComp { this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos2").getChildByName("hero").active=false this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos3").getChildByName("hero").active=false - let heros=ecs.query(ecs.allOf(HeroModelComp)) + let heros=ecs.query(ecs.allOf(HeroModelComp).excludeOf(HartModelComp)) for(let hero of heros){ let hv = hero.get(HeroViewComp) if(hv.fight_pos==0){ @@ -110,7 +111,7 @@ export class MissionHeroCompComp extends CCComp { get_info_and_remove(fight_pos:number,uuid:number){ let info:any={ap:0,hp:0,lv:0} - let heros=ecs.query(ecs.allOf(HeroModelComp)) + let heros=ecs.query(ecs.allOf(HeroModelComp).excludeOf(HartModelComp)) for(let hero of heros){ if(hero.get(HeroViewComp).fight_pos==fight_pos){ let hv = hero.get(HeroViewComp)