From e3b5f4bd0502e559f14ec5a449f256873e7fa146 Mon Sep 17 00:00:00 2001 From: "pan@work" Date: Mon, 22 Jul 2024 09:47:28 +0800 Subject: [PATCH] monster add --- assets/resources/game/heros.meta | 1 + assets/resources/game/heros/heath.prefab | 805 ++++++++++++++++++ assets/resources/game/heros/heath.prefab.meta | 13 + assets/resources/game/heros/magic.prefab | 805 ++++++++++++++++++ assets/resources/game/heros/magic.prefab.meta | 13 + assets/resources/game/heros/war.prefab | 805 ++++++++++++++++++ assets/resources/game/heros/war.prefab.meta | 13 + .../role/view => resources/game}/monster.meta | 0 assets/resources/game/monster/boss.prefab | 805 ++++++++++++++++++ .../resources/game/monster/boss.prefab.meta | 13 + assets/resources/game/monster/monster.prefab | 805 ++++++++++++++++++ .../game/monster/monster.prefab.meta | 13 + assets/script/game/heros.meta | 9 + assets/script/game/heros/HeroSpine.ts | 88 ++ .../HeroSpine.ts.meta} | 2 +- assets/script/game/heros/HeroSpineAnimator.ts | 58 ++ .../game/heros/HeroSpineAnimator.ts.meta | 1 + assets/script/game/heros/HeroViewComp.ts | 33 + assets/script/game/heros/HeroViewComp.ts.meta | 1 + assets/script/game/map/view/MapViewComp.ts | 17 +- assets/script/game/monster.meta | 9 + assets/script/game/monster/Monster.ts | 54 ++ assets/script/game/monster/Monster.ts.meta | 9 + .../script/game/monster/MonsterModelComp.ts | 27 + .../game/monster/MonsterModelComp.ts.meta | 9 + .../{role/view => }/monster/MonsterSpine.ts | 5 +- .../view => }/monster/MonsterSpine.ts.meta | 0 .../view => }/monster/MonsterSpineAnimator.ts | 8 +- .../monster/MonsterSpineAnimator.ts.meta | 0 .../MonsterViewComp.ts} | 4 +- .../game/monster/MonsterViewComp.ts.meta | 9 + 31 files changed, 4417 insertions(+), 17 deletions(-) create mode 100644 assets/resources/game/heros.meta create mode 100644 assets/resources/game/heros/heath.prefab create mode 100644 assets/resources/game/heros/heath.prefab.meta create mode 100644 assets/resources/game/heros/magic.prefab create mode 100644 assets/resources/game/heros/magic.prefab.meta create mode 100644 assets/resources/game/heros/war.prefab create mode 100644 assets/resources/game/heros/war.prefab.meta rename assets/{script/game/role/view => resources/game}/monster.meta (100%) create mode 100644 assets/resources/game/monster/boss.prefab create mode 100644 assets/resources/game/monster/boss.prefab.meta create mode 100644 assets/resources/game/monster/monster.prefab create mode 100644 assets/resources/game/monster/monster.prefab.meta create mode 100644 assets/script/game/heros.meta create mode 100644 assets/script/game/heros/HeroSpine.ts rename assets/script/game/{role/view/monster/RoleViewComp.ts.meta => heros/HeroSpine.ts.meta} (54%) create mode 100644 assets/script/game/heros/HeroSpineAnimator.ts create mode 100644 assets/script/game/heros/HeroSpineAnimator.ts.meta create mode 100644 assets/script/game/heros/HeroViewComp.ts create mode 100644 assets/script/game/heros/HeroViewComp.ts.meta create mode 100644 assets/script/game/monster.meta create mode 100644 assets/script/game/monster/Monster.ts create mode 100644 assets/script/game/monster/Monster.ts.meta create mode 100644 assets/script/game/monster/MonsterModelComp.ts create mode 100644 assets/script/game/monster/MonsterModelComp.ts.meta rename assets/script/game/{role/view => }/monster/MonsterSpine.ts (89%) rename assets/script/game/{role/view => }/monster/MonsterSpine.ts.meta (100%) rename assets/script/game/{role/view => }/monster/MonsterSpineAnimator.ts (83%) rename assets/script/game/{role/view => }/monster/MonsterSpineAnimator.ts.meta (100%) rename assets/script/game/{role/view/monster/RoleViewComp.ts => monster/MonsterViewComp.ts} (78%) create mode 100644 assets/script/game/monster/MonsterViewComp.ts.meta diff --git a/assets/resources/game/heros.meta b/assets/resources/game/heros.meta new file mode 100644 index 00000000..d328789b --- /dev/null +++ b/assets/resources/game/heros.meta @@ -0,0 +1 @@ +{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"f7685708-32aa-4090-b7f8-c2095acfce23","files":[],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/heath.prefab b/assets/resources/game/heros/heath.prefab new file mode 100644 index 00000000..bd11da63 --- /dev/null +++ b/assets/resources/game/heros/heath.prefab @@ -0,0 +1,805 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "heath", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "heath", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 32 + }, + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 38 + }, + "_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.Node", + "_name": "shader", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_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": 165, + "height": 119 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7NISe7HdAD68SLfhnddy8" + }, + { + "__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": 255 + }, + "_spriteFrame": { + "__uuid__": "b1745dc0-d78b-4443-a4fc-746ff6749b39@f9941", + "__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": "e71ctEmpxFC4KlSYRZNz/a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "66VNgwnoRDmprg2mtbH825", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "avatar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_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.25, + "y": 0.25, + "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": 320, + "height": 320 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.53125, + "y": 0.53125 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2epemEawRGPpO3vKyuHHBL" + }, + { + "__type__": "sp.Skeleton", + "_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 + }, + "_skeletonData": { + "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "heath", + "defaultAnimation": "idle", + "_premultipliedAlpha": false, + "_timeScale": 1, + "_preCacheMode": 1, + "_cacheMode": 1, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d6Qb8NhhhN1ascGn7UPZok" + }, + { + "__type__": "4f849gsxotJULUhiSQ4gEsa", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "de0V8nea1AR7+XXhaDFgCf" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48a+Hx9oREoZ7vqKgprKhT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 113, + "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": "lab_name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 16 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.12, + "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__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 189.390625, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c68UOAlNhN171Umca6yVvF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "oops - framework", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 24, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 1, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2frm37uaJHQr0AEEaYyM82" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aeeDsd9JVLMK0M/n2WTVl7" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31uZ7ewvdKoKWqTJ+narWR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "234p72JXlGdp68uJcFfl0q" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a5G3mGGpNLDI2/5kZx17N8" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6Y+tOem9EaKNOQr6QHMns", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": -1, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dWWGO2rFK4LL+PeQ7ANRn" + }, + { + "__type__": "c66b3pkkN9EVLIyoYsFuu0g", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "animator": { + "__id__": 13 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "830XWI4d1CU4pagLZ/nM3J" + }, + { + "__type__": "ffc9e88TehJlqvgKW2JVtz+", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "37VIdk5BVNxqSq7DlGbRu2" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/heros/heath.prefab.meta b/assets/resources/game/heros/heath.prefab.meta new file mode 100644 index 00000000..dc715748 --- /dev/null +++ b/assets/resources/game/heros/heath.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "ca77728b-167f-4867-98af-3584611c2e1e", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "heath" + } +} diff --git a/assets/resources/game/heros/magic.prefab b/assets/resources/game/heros/magic.prefab new file mode 100644 index 00000000..71125945 --- /dev/null +++ b/assets/resources/game/heros/magic.prefab @@ -0,0 +1,805 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "magic", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "magic", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 32 + }, + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 38 + }, + "_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.Node", + "_name": "shader", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_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": 165, + "height": 119 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7NISe7HdAD68SLfhnddy8" + }, + { + "__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": 255 + }, + "_spriteFrame": { + "__uuid__": "b1745dc0-d78b-4443-a4fc-746ff6749b39@f9941", + "__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": "e71ctEmpxFC4KlSYRZNz/a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "66VNgwnoRDmprg2mtbH825", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "avatar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_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.25, + "y": 0.25, + "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": 320, + "height": 320 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.53125, + "y": 0.53125 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2epemEawRGPpO3vKyuHHBL" + }, + { + "__type__": "sp.Skeleton", + "_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 + }, + "_skeletonData": { + "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "heath", + "defaultAnimation": "idle", + "_premultipliedAlpha": false, + "_timeScale": 1, + "_preCacheMode": 1, + "_cacheMode": 1, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d6Qb8NhhhN1ascGn7UPZok" + }, + { + "__type__": "4f849gsxotJULUhiSQ4gEsa", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "de0V8nea1AR7+XXhaDFgCf" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48a+Hx9oREoZ7vqKgprKhT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 113, + "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": "lab_name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 16 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.12, + "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__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 189.390625, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c68UOAlNhN171Umca6yVvF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "oops - framework", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 24, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 1, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2frm37uaJHQr0AEEaYyM82" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aeeDsd9JVLMK0M/n2WTVl7" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31uZ7ewvdKoKWqTJ+narWR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "234p72JXlGdp68uJcFfl0q" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a5G3mGGpNLDI2/5kZx17N8" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6Y+tOem9EaKNOQr6QHMns", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": -1, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dWWGO2rFK4LL+PeQ7ANRn" + }, + { + "__type__": "c66b3pkkN9EVLIyoYsFuu0g", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "animator": { + "__id__": 13 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "830XWI4d1CU4pagLZ/nM3J" + }, + { + "__type__": "ffc9e88TehJlqvgKW2JVtz+", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "37VIdk5BVNxqSq7DlGbRu2" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/heros/magic.prefab.meta b/assets/resources/game/heros/magic.prefab.meta new file mode 100644 index 00000000..8b76a93d --- /dev/null +++ b/assets/resources/game/heros/magic.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "4882778a-333f-4a05-9da3-76e3e8dc9adf", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "magic" + } +} diff --git a/assets/resources/game/heros/war.prefab b/assets/resources/game/heros/war.prefab new file mode 100644 index 00000000..d08d8ab9 --- /dev/null +++ b/assets/resources/game/heros/war.prefab @@ -0,0 +1,805 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "war", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "war", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 32 + }, + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 38 + }, + "_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.Node", + "_name": "shader", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_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": 165, + "height": 119 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7NISe7HdAD68SLfhnddy8" + }, + { + "__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": 255 + }, + "_spriteFrame": { + "__uuid__": "b1745dc0-d78b-4443-a4fc-746ff6749b39@f9941", + "__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": "e71ctEmpxFC4KlSYRZNz/a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "66VNgwnoRDmprg2mtbH825", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "avatar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_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.25, + "y": 0.25, + "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": 320, + "height": 320 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.53125, + "y": 0.53125 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2epemEawRGPpO3vKyuHHBL" + }, + { + "__type__": "sp.Skeleton", + "_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 + }, + "_skeletonData": { + "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "heath", + "defaultAnimation": "idle", + "_premultipliedAlpha": false, + "_timeScale": 1, + "_preCacheMode": 1, + "_cacheMode": 1, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d6Qb8NhhhN1ascGn7UPZok" + }, + { + "__type__": "4f849gsxotJULUhiSQ4gEsa", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "de0V8nea1AR7+XXhaDFgCf" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48a+Hx9oREoZ7vqKgprKhT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 113, + "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": "lab_name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 16 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.12, + "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__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 189.390625, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c68UOAlNhN171Umca6yVvF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "oops - framework", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 24, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 1, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2frm37uaJHQr0AEEaYyM82" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aeeDsd9JVLMK0M/n2WTVl7" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31uZ7ewvdKoKWqTJ+narWR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "234p72JXlGdp68uJcFfl0q" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a5G3mGGpNLDI2/5kZx17N8" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6Y+tOem9EaKNOQr6QHMns", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": -1, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dWWGO2rFK4LL+PeQ7ANRn" + }, + { + "__type__": "c66b3pkkN9EVLIyoYsFuu0g", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "animator": { + "__id__": 13 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "830XWI4d1CU4pagLZ/nM3J" + }, + { + "__type__": "ffc9e88TehJlqvgKW2JVtz+", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "37VIdk5BVNxqSq7DlGbRu2" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/heros/war.prefab.meta b/assets/resources/game/heros/war.prefab.meta new file mode 100644 index 00000000..ccf59ac9 --- /dev/null +++ b/assets/resources/game/heros/war.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "a0921e44-f574-4467-8c6f-37d821e22798", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "war" + } +} diff --git a/assets/script/game/role/view/monster.meta b/assets/resources/game/monster.meta similarity index 100% rename from assets/script/game/role/view/monster.meta rename to assets/resources/game/monster.meta diff --git a/assets/resources/game/monster/boss.prefab b/assets/resources/game/monster/boss.prefab new file mode 100644 index 00000000..3a20215e --- /dev/null +++ b/assets/resources/game/monster/boss.prefab @@ -0,0 +1,805 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "boss", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "boss", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 32 + }, + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 38 + }, + "_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.Node", + "_name": "shader", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_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": 165, + "height": 119 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7NISe7HdAD68SLfhnddy8" + }, + { + "__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": 255 + }, + "_spriteFrame": { + "__uuid__": "b1745dc0-d78b-4443-a4fc-746ff6749b39@f9941", + "__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": "e71ctEmpxFC4KlSYRZNz/a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "66VNgwnoRDmprg2mtbH825", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "avatar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_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.25, + "y": 0.25, + "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": 320, + "height": 320 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.53125, + "y": 0.53125 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2epemEawRGPpO3vKyuHHBL" + }, + { + "__type__": "sp.Skeleton", + "_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 + }, + "_skeletonData": { + "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "war", + "defaultAnimation": "idle", + "_premultipliedAlpha": false, + "_timeScale": 1, + "_preCacheMode": 1, + "_cacheMode": 1, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d6Qb8NhhhN1ascGn7UPZok" + }, + { + "__type__": "d3a79W3OpNBsL5WHT9mZqHd", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "69mhfaIZlB4rqXSUCD6dhL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48a+Hx9oREoZ7vqKgprKhT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 113, + "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": "lab_name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 16 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.12, + "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__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 189.390625, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c68UOAlNhN171Umca6yVvF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "oops - framework", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 24, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 1, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2frm37uaJHQr0AEEaYyM82" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aeeDsd9JVLMK0M/n2WTVl7" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31uZ7ewvdKoKWqTJ+narWR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "234p72JXlGdp68uJcFfl0q" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a5G3mGGpNLDI2/5kZx17N8" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6Y+tOem9EaKNOQr6QHMns", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": -1, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dWWGO2rFK4LL+PeQ7ANRn" + }, + { + "__type__": "482c2FsvvZJ+5BgN3d7gY+D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "animator": { + "__id__": 13 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6cDIo6gXFNnbPNuWVAqhBD" + }, + { + "__type__": "dc1b7IQTVxHfIHFfWu0u4I/", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "88a6VdbQBB7YwXovYCN2Sy" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/monster/boss.prefab.meta b/assets/resources/game/monster/boss.prefab.meta new file mode 100644 index 00000000..e3b57c30 --- /dev/null +++ b/assets/resources/game/monster/boss.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "10ede57e-4c21-4ce6-aad3-f7e793a14412", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "boss" + } +} diff --git a/assets/resources/game/monster/monster.prefab b/assets/resources/game/monster/monster.prefab new file mode 100644 index 00000000..f9bfe03a --- /dev/null +++ b/assets/resources/game/monster/monster.prefab @@ -0,0 +1,805 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "monster", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "monster", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 32 + }, + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 38 + }, + "_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.Node", + "_name": "shader", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_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": 165, + "height": 119 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7NISe7HdAD68SLfhnddy8" + }, + { + "__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": 255 + }, + "_spriteFrame": { + "__uuid__": "b1745dc0-d78b-4443-a4fc-746ff6749b39@f9941", + "__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": "e71ctEmpxFC4KlSYRZNz/a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "66VNgwnoRDmprg2mtbH825", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "avatar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_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.25, + "y": 0.25, + "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": 320, + "height": 320 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.53125, + "y": 0.53125 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2epemEawRGPpO3vKyuHHBL" + }, + { + "__type__": "sp.Skeleton", + "_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 + }, + "_skeletonData": { + "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "war", + "defaultAnimation": "idle", + "_premultipliedAlpha": false, + "_timeScale": 1, + "_preCacheMode": 1, + "_cacheMode": 1, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d6Qb8NhhhN1ascGn7UPZok" + }, + { + "__type__": "d3a79W3OpNBsL5WHT9mZqHd", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "69mhfaIZlB4rqXSUCD6dhL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48a+Hx9oREoZ7vqKgprKhT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 113, + "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": "lab_name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 16 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.12, + "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__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 189.390625, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c68UOAlNhN171Umca6yVvF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "oops - framework", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 24, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 1, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2frm37uaJHQr0AEEaYyM82" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 17 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aeeDsd9JVLMK0M/n2WTVl7" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31uZ7ewvdKoKWqTJ+narWR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "234p72JXlGdp68uJcFfl0q" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a5G3mGGpNLDI2/5kZx17N8" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6Y+tOem9EaKNOQr6QHMns", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": -1, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dWWGO2rFK4LL+PeQ7ANRn" + }, + { + "__type__": "482c2FsvvZJ+5BgN3d7gY+D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "animator": { + "__id__": 13 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6cDIo6gXFNnbPNuWVAqhBD" + }, + { + "__type__": "dc1b7IQTVxHfIHFfWu0u4I/", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "88a6VdbQBB7YwXovYCN2Sy" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/monster/monster.prefab.meta b/assets/resources/game/monster/monster.prefab.meta new file mode 100644 index 00000000..ec4e59ec --- /dev/null +++ b/assets/resources/game/monster/monster.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "c6dffedb-40ff-452c-981d-864b29130612", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "monster" + } +} diff --git a/assets/script/game/heros.meta b/assets/script/game/heros.meta new file mode 100644 index 00000000..40c78b0b --- /dev/null +++ b/assets/script/game/heros.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "d69b1760-afe9-4a23-bc30-01ee0adf48cc", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/heros/HeroSpine.ts b/assets/script/game/heros/HeroSpine.ts new file mode 100644 index 00000000..d42e84a4 --- /dev/null +++ b/assets/script/game/heros/HeroSpine.ts @@ -0,0 +1,88 @@ +/* + * @Author: dgflash + * @Date: 2022-08-04 15:08:35 + * @LastEditors: dgflash + * @LastEditTime: 2022-08-04 15:26:26 + */ +import { Color, Component, EventTouch, sp, Vec3, _decorator } from "cc"; +import { LayerUtil } from "../../../../extensions/oops-plugin-framework/assets/core/utils/LayerUtil"; +import { smc } from "../../../script/game/common/SingletonModuleComp"; +// import Charactor, { CharactorDirection, CharactorState } from "../../map/view/map/charactor/Charactor"; +import HeroSpineAnimator from "./HeroSpineAnimator"; + +const { ccclass, property } = _decorator; + +/** + * RPG SPINE角色模型 + */ +@ccclass('HeroSpine') +export class HeroSpine extends Component { + @property({ type: HeroSpineAnimator, tooltip: '动画控制器' }) + animator: HeroSpineAnimator = null!; + + private spine!: sp.Skeleton; + // private charactor!: Charactor; + + onLoad() { + // 角色控制组件 + // this.charactor = this.addComponent(Charactor)!; + + this.initAnimator(); + // this.setSkin("magic"); + // this.animator.play("idle", true); + LayerUtil.setNodeLayer(LayerUtil.MAP, this.node); + } + + /** 初始化动画 */ + protected initAnimator() { + this.spine = this.animator.getComponent(sp.Skeleton)!; + } + + + + + + // setState(value: CharactorState): void { + // switch (value) { + // case CharactorState.Idle: + // this.idle(); + // break; + // case CharactorState.Run: + // this.walk(); + // break; + // } + // } + + setSkin(value: string): void { + console.log("HeroSpine setSkin", value); + this.spine.setSkin(value); + } + play(animName: string, loop: boolean): void { + this.spine.setAnimation(0, animName, loop); + } + setAlpha(value: number): void { + var color: Color = this.spine.color; + color.a = 255 * (value / 1); + this.spine.color = color; + } + + setPos(value: Vec3): void { + this.node.position = value; + } + + checkTouch(event: EventTouch): boolean { + return false; + } + + onDestroy() { + this.node.destroy(); + } + + walk() { + + } + + idle() { + + } +} diff --git a/assets/script/game/role/view/monster/RoleViewComp.ts.meta b/assets/script/game/heros/HeroSpine.ts.meta similarity index 54% rename from assets/script/game/role/view/monster/RoleViewComp.ts.meta rename to assets/script/game/heros/HeroSpine.ts.meta index 8264624b..8fc32243 100644 --- a/assets/script/game/role/view/monster/RoleViewComp.ts.meta +++ b/assets/script/game/heros/HeroSpine.ts.meta @@ -1 +1 @@ -{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"b5ce7cce-a8eb-439f-b034-13d10f8f9e2f","files":[],"subMetas":{},"userData":{}} +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"c66b3a64-90df-4454-b232-a18b05baed20","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/heros/HeroSpineAnimator.ts b/assets/script/game/heros/HeroSpineAnimator.ts new file mode 100644 index 00000000..183bded0 --- /dev/null +++ b/assets/script/game/heros/HeroSpineAnimator.ts @@ -0,0 +1,58 @@ +/* + * @Author: dgflash + * @Date: 2022-08-04 15:08:35 + * @LastEditors: dgflash + * @LastEditTime: 2022-08-04 15:26:38 + */ +import { sp, _decorator ,Component} from "cc"; + +const { ccclass, property, requireComponent, disallowMultiple } = _decorator; + +/** + * Spine状态机组件(主状态机),trackIndex为0 + */ +@ccclass +@disallowMultiple +@requireComponent(sp.Skeleton) +export default class HeroSpineAnimator extends Component { + private animName: string = "idle"; + private loop: boolean = true; + private spine!: sp.Skeleton; + start() { + this.spine = this.getComponent(sp.Skeleton)!; + console.log("HeroSpineAnimator start"); + this.playAnimation(this.animName, this.loop); + } + + lateUpdate(dt: number) { + // + } + + play(animName: string, loop: boolean) { + if (animName) { + this.animName = animName; + this.loop = loop; + this.spine.setAnimation(0, this.animName, this.loop); + } + else { + } + } + /** + * 播放动画 + * @override + * @param animName 动画名 + * @param loop 是否循环播放 + */ + protected playAnimation(animName: string, loop: boolean) { + console.log("HeroSpineAnimator playAnimation"); + if (animName) { + console.log("HeroSpineAnimator playAnimation animName", animName); + this.animName = animName; + this.loop = loop; + this.spine.setAnimation(0, this.animName, this.loop); + } + else { + } + } + +} \ No newline at end of file diff --git a/assets/script/game/heros/HeroSpineAnimator.ts.meta b/assets/script/game/heros/HeroSpineAnimator.ts.meta new file mode 100644 index 00000000..c3384948 --- /dev/null +++ b/assets/script/game/heros/HeroSpineAnimator.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"4f84982c-c68b-4950-b521-892438804b1a","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/heros/HeroViewComp.ts b/assets/script/game/heros/HeroViewComp.ts new file mode 100644 index 00000000..7796045c --- /dev/null +++ b/assets/script/game/heros/HeroViewComp.ts @@ -0,0 +1,33 @@ +/* + * @Author: dgflash + * @Date: 2021-11-18 17:42:59 + * @LastEditors: dgflash + * @LastEditTime: 2022-08-17 12:36:18 + */ + +import { Vec3, _decorator } from "cc"; +import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; +import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; +import { HeroSpine } from "./HeroSpine"; + +const { ccclass, property } = _decorator; + +/** 角色显示组件 */ +@ccclass('HeroViewComp') // 定义为 Cocos Creator 组件 +@ecs.register('HeroView', false) // 定义为 ECS 组件 +export class HeroViewComp extends CCComp { + /** 角色动画 */ + as: HeroSpine = null!; + /** 角色控制器 */ + + /** 视图层逻辑代码分离演示 */ + onLoad() { + this.as = this.getComponent(HeroSpine); + } + + + + reset() { + this.node.destroy(); + } +} \ No newline at end of file diff --git a/assets/script/game/heros/HeroViewComp.ts.meta b/assets/script/game/heros/HeroViewComp.ts.meta new file mode 100644 index 00000000..b84556ef --- /dev/null +++ b/assets/script/game/heros/HeroViewComp.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"ffc9ef3c-4de8-4996-abe0-296d8956dcfe","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/map/view/MapViewComp.ts b/assets/script/game/map/view/MapViewComp.ts index a0aaf243..5fcc3dc2 100644 --- a/assets/script/game/map/view/MapViewComp.ts +++ b/assets/script/game/map/view/MapViewComp.ts @@ -3,6 +3,7 @@ import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { smc } from "../../common/SingletonModuleComp"; import { Role } from "../../role/Role"; +import { Monster } from "../../monster/monster"; // import MapRoadUtils from "./map/road/MapRoadUtils"; import { MapViewScene } from "./MapViewScene"; import { Timer } from "../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer"; @@ -49,15 +50,15 @@ export class MapViewComp extends CCComp { this.scene.node.active = true // smc.monsters = ['war','magic','heath'] // smc.heros = ['war','magic','heath'] - if (smc.heros.length>0){ - let hero = ecs.getEntity(Role); - let x = this.getRandomInt(-300, 0) - hero.load(this.aStarToVec3(x+',60'), false, "magic"); - } + // if (smc.heros.length>0){ + // let hero = ecs.getEntity(Role); + // let x = this.getRandomInt(-300, 0) + // hero.load(this.aStarToVec3(x+',60'), false, "magic"); + // } if (smc.monsters.length>0){ - let monster = ecs.getEntity(Role); - let x = this.getRandomInt(0, 300) - monster.load(this.aStarToVec3(x+'60'), true, "magic"); + let monster = ecs.getEntity(Monster); + let x = this.getRandomInt(-100, 100) + monster.load(this.aStarToVec3(x+',-60')); } // smc.own.loadJoystick(); diff --git a/assets/script/game/monster.meta b/assets/script/game/monster.meta new file mode 100644 index 00000000..af0daba3 --- /dev/null +++ b/assets/script/game/monster.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "9addebc8-0dc6-46c3-b9d5-091539127714", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/monster/Monster.ts b/assets/script/game/monster/Monster.ts new file mode 100644 index 00000000..ef4c6edd --- /dev/null +++ b/assets/script/game/monster/Monster.ts @@ -0,0 +1,54 @@ + +/* + * @Author: dgflash + * @Date: 2021-11-18 17:47:56 + * @LastEditors: dgflash + * @LastEditTime: 2022-08-04 15:43:04 + */ +import { instantiate, Node, Prefab, Vec3 } from "cc"; +import { UICallbacks } from "../../../../extensions/oops-plugin-framework/assets/core/gui/layer/Defines"; +import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; +import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; +import { UIID } from "../common/config/GameUIConfig"; +import { smc } from "../common/SingletonModuleComp"; +import { MonsterModelComp } from "./MonsterModelComp"; +import { MonsterSpine } from "./MonsterSpine"; +import { MonsterViewComp } from "./MonsterViewComp"; + +/** 角色实体 */ +@ecs.register(`Monster`) +export class Monster extends ecs.Entity { + // 数据层 + MonsterModel!: MonsterModelComp; + // 视图层 + MonsterView!: MonsterViewComp; + + protected init() { + this.addComponents( + MonsterModelComp); + } + + destroy(): void { + this.remove(MonsterViewComp); + super.destroy(); + } + + /** 加载角色 */ + load(pos: Vec3 = Vec3.ZERO) { + + var path = "game/monster/monster"; + + var prefab: Prefab = oops.res.get(path, Prefab)!; + var node = instantiate(prefab); + var scene = smc.map.MapView.scene; + node.parent = scene.entityLayer!.node!; + var as = node.getComponent(MonsterSpine); + node.setPosition(pos) + + var mv = node.getComponent(MonsterViewComp)!; + this.add(mv); + node.setScale(-1, 1, 1); + } + + +} \ No newline at end of file diff --git a/assets/script/game/monster/Monster.ts.meta b/assets/script/game/monster/Monster.ts.meta new file mode 100644 index 00000000..78d269b9 --- /dev/null +++ b/assets/script/game/monster/Monster.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "e889d785-f34d-46f5-825c-8906863db245", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/monster/MonsterModelComp.ts b/assets/script/game/monster/MonsterModelComp.ts new file mode 100644 index 00000000..7141af01 --- /dev/null +++ b/assets/script/game/monster/MonsterModelComp.ts @@ -0,0 +1,27 @@ +/* + * @Author: dgflash + * @Date: 2021-11-18 15:56:01 + * @LastEditors: dgflash + * @LastEditTime: 2022-08-17 13:43:25 + */ +import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; + +/** + * 角色属性数据 + */ +@ecs.register('MonsterModel') +export class MonsterModelComp extends ecs.Comp { + /** 角色编号 */ + id: number = -1; + + /** 角色名 */ + name: string = "monster"; + + /** 动画名资源 */ + anim: string = "monster"; + + reset() { + this.id = -1; + this.name = ""; + } +} diff --git a/assets/script/game/monster/MonsterModelComp.ts.meta b/assets/script/game/monster/MonsterModelComp.ts.meta new file mode 100644 index 00000000..644ba87f --- /dev/null +++ b/assets/script/game/monster/MonsterModelComp.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "b5f2873a-5007-436b-95ef-1e73281a374f", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/role/view/monster/MonsterSpine.ts b/assets/script/game/monster/MonsterSpine.ts similarity index 89% rename from assets/script/game/role/view/monster/MonsterSpine.ts rename to assets/script/game/monster/MonsterSpine.ts index 70fa5b0b..f9f54890 100644 --- a/assets/script/game/role/view/monster/MonsterSpine.ts +++ b/assets/script/game/monster/MonsterSpine.ts @@ -5,8 +5,8 @@ * @LastEditTime: 2022-08-04 15:26:26 */ import { Color, Component, EventTouch, sp, Vec3, _decorator } from "cc"; -import { LayerUtil } from "../../../../../../extensions/oops-plugin-framework/assets/core/utils/LayerUtil"; -import { smc } from "../../../common/SingletonModuleComp"; +import { LayerUtil } from "../../../../extensions/oops-plugin-framework/assets/core/utils/LayerUtil"; +import { smc } from "../../../script/game/common/SingletonModuleComp"; // import Charactor, { CharactorDirection, CharactorState } from "../../map/view/map/charactor/Charactor"; import MonsterSpineAnimator from "./MonsterSpineAnimator"; @@ -36,6 +36,7 @@ export class MonsterSpine extends Component { /** 初始化动画 */ protected initAnimator() { this.spine = this.animator.getComponent(sp.Skeleton)!; + console.log("MonsterSpine initAnimator", this.spine); } diff --git a/assets/script/game/role/view/monster/MonsterSpine.ts.meta b/assets/script/game/monster/MonsterSpine.ts.meta similarity index 100% rename from assets/script/game/role/view/monster/MonsterSpine.ts.meta rename to assets/script/game/monster/MonsterSpine.ts.meta diff --git a/assets/script/game/role/view/monster/MonsterSpineAnimator.ts b/assets/script/game/monster/MonsterSpineAnimator.ts similarity index 83% rename from assets/script/game/role/view/monster/MonsterSpineAnimator.ts rename to assets/script/game/monster/MonsterSpineAnimator.ts index 5ce44818..e7b96a6c 100644 --- a/assets/script/game/role/view/monster/MonsterSpineAnimator.ts +++ b/assets/script/game/monster/MonsterSpineAnimator.ts @@ -14,13 +14,13 @@ const { ccclass, property, requireComponent, disallowMultiple } = _decorator; @ccclass @disallowMultiple @requireComponent(sp.Skeleton) -export default class RoleSpineAnimator extends Component { +export default class MonsterSpineAnimator extends Component { private animName: string = "idle"; private loop: boolean = true; private spine!: sp.Skeleton; start() { this.spine = this.getComponent(sp.Skeleton)!; - console.log("RoleSpineAnimator start"); + console.log("MonsterSpineAnimator start"); this.playAnimation(this.animName, this.loop); } @@ -44,9 +44,9 @@ export default class RoleSpineAnimator extends Component { * @param loop 是否循环播放 */ protected playAnimation(animName: string, loop: boolean) { - console.log("RoleSpineAnimator playAnimation"); + console.log("MonsterSpineAnimator playAnimation"); if (animName) { - console.log("RoleSpineAnimator playAnimation animName", animName); + console.log("MonsterSpineAnimator playAnimation animName", animName); this.animName = animName; this.loop = loop; this.spine.setAnimation(0, this.animName, this.loop); diff --git a/assets/script/game/role/view/monster/MonsterSpineAnimator.ts.meta b/assets/script/game/monster/MonsterSpineAnimator.ts.meta similarity index 100% rename from assets/script/game/role/view/monster/MonsterSpineAnimator.ts.meta rename to assets/script/game/monster/MonsterSpineAnimator.ts.meta diff --git a/assets/script/game/role/view/monster/RoleViewComp.ts b/assets/script/game/monster/MonsterViewComp.ts similarity index 78% rename from assets/script/game/role/view/monster/RoleViewComp.ts rename to assets/script/game/monster/MonsterViewComp.ts index 2ef31244..8aded8b5 100644 --- a/assets/script/game/role/view/monster/RoleViewComp.ts +++ b/assets/script/game/monster/MonsterViewComp.ts @@ -6,8 +6,8 @@ */ import { Vec3, _decorator } from "cc"; -import { ecs } from "../../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { CCComp } from "../../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; +import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; +import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { MonsterSpine } from "./MonsterSpine"; const { ccclass, property } = _decorator; diff --git a/assets/script/game/monster/MonsterViewComp.ts.meta b/assets/script/game/monster/MonsterViewComp.ts.meta new file mode 100644 index 00000000..c75d41fa --- /dev/null +++ b/assets/script/game/monster/MonsterViewComp.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "dc1b7210-4d5c-477c-81c5-7d6bb4bb823f", + "files": [], + "subMetas": {}, + "userData": {} +}