diff --git a/assets/resources/game/heros/heath.meta b/assets/resources/game/heros/heath.meta new file mode 100644 index 00000000..e2c019d9 --- /dev/null +++ b/assets/resources/game/heros/heath.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "8acb3fd5-26f2-4436-b699-0f755a10bc98", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/game/heros/heath.prefab b/assets/resources/game/heros/heath.prefab index bd11da63..8da894f5 100644 --- a/assets/resources/game/heros/heath.prefab +++ b/assets/resources/game/heros/heath.prefab @@ -315,7 +315,7 @@ "a": 255 }, "_skeletonData": { - "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__uuid__": "8e6ee39e-8b23-4562-846f-ad44c2bddb09", "__expectedType__": "sp.SkeletonData" }, "defaultSkin": "heath", diff --git a/assets/resources/game/heros/heath/skeleton.atlas b/assets/resources/game/heros/heath/skeleton.atlas new file mode 100644 index 00000000..62d1b55c --- /dev/null +++ b/assets/resources/game/heros/heath/skeleton.atlas @@ -0,0 +1,34 @@ + +skeleton.png +size: 1271,324 +format: RGBA8888 +filter: Linear,Linear +repeat: none +hb_01 + rotate: false + xy: 2, 2 + size: 320, 320 + orig: 320, 320 + offset: 0, 0 + index: -1 +hb_02 + rotate: false + xy: 645, 10 + size: 312, 312 + orig: 320, 320 + offset: 1, 4 + index: -1 +hb_03 + rotate: true + xy: 324, 2 + size: 320, 319 + orig: 320, 320 + offset: 0, 1 + index: -1 +hb_04 + rotate: false + xy: 959, 12 + size: 310, 310 + orig: 320, 320 + offset: 2, 8 + index: -1 diff --git a/assets/resources/game/heros/heath/skeleton.atlas.meta b/assets/resources/game/heros/heath/skeleton.atlas.meta new file mode 100644 index 00000000..de98fca3 --- /dev/null +++ b/assets/resources/game/heros/heath/skeleton.atlas.meta @@ -0,0 +1 @@ +{"ver":"1.0.1","importer":"*","imported":true,"uuid":"c73188bd-afda-4450-945f-1c1b442c561a","files":[".atlas",".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/heath/skeleton.json b/assets/resources/game/heros/heath/skeleton.json new file mode 100644 index 00000000..6ef9e551 --- /dev/null +++ b/assets/resources/game/heros/heath/skeleton.json @@ -0,0 +1,99 @@ +{ +"skeleton": { + "hash": "fYDeOpztoYDiS0D+OqdbTuJk36Y", + "spine": "3.8.99", + "x": -170, + "y": -170, + "width": 320, + "height": 320, + "images": "", + "audio": "" +}, +"bones": [ + { "name": "root", "x": -10, "y": -10 } +], +"slots": [ + { "name": "hero_background", "bone": "root", "attachment": "hb_03" } +], +"skins": [ + { + "name": "heath", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_04", "width": 320, "height": 320 } + } + } + }, + { + "name": "magic", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_01", "x": -0.1, "y": 0.19, "width": 320, "height": 320 } + } + } + }, + { + "name": "monster", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_02", "width": 320, "height": 320 } + } + } + }, + { + "name": "war", + "attachments": { + "hero_background": { + "hb_03": { "width": 320, "height": 320 } + } + } + } +], +"animations": { + "act1": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3333, "x": -20 }, + { "time": 0.5667, "x": 40 }, + { "time": 0.8 } + ] + } + } + }, + "idle": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.5, "y": 8 }, + { "time": 1 } + ] + } + } + }, + "magic1": { + "bones": { + "root": { + "rotate": [ + {}, + { "time": 0.5, "angle": 15 }, + { "time": 1 } + ] + } + } + }, + "move": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3667, "y": 15 }, + { "time": 0.8 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/assets/resources/game/heros/heath/skeleton.json.meta b/assets/resources/game/heros/heath/skeleton.json.meta new file mode 100644 index 00000000..80723e97 --- /dev/null +++ b/assets/resources/game/heros/heath/skeleton.json.meta @@ -0,0 +1 @@ +{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"8e6ee39e-8b23-4562-846f-ad44c2bddb09","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/heath/skeleton.png b/assets/resources/game/heros/heath/skeleton.png new file mode 100644 index 00000000..60444402 Binary files /dev/null and b/assets/resources/game/heros/heath/skeleton.png differ diff --git a/assets/resources/game/heros/heath/skeleton.png.meta b/assets/resources/game/heros/heath/skeleton.png.meta new file mode 100644 index 00000000..9143ee27 --- /dev/null +++ b/assets/resources/game/heros/heath/skeleton.png.meta @@ -0,0 +1,42 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "c71977ce-c225-48e2-a5a7-b1d8dda2358a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "c71977ce-c225-48e2-a5a7-b1d8dda2358a@6c48a", + "displayName": "skeleton", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "c71977ce-c225-48e2-a5a7-b1d8dda2358a", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "texture", + "fixAlphaTransparencyArtifacts": false, + "redirect": "c71977ce-c225-48e2-a5a7-b1d8dda2358a@6c48a" + } +} diff --git a/assets/resources/game/heros/magic.meta b/assets/resources/game/heros/magic.meta new file mode 100644 index 00000000..07d2497a --- /dev/null +++ b/assets/resources/game/heros/magic.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "85cd5c8a-4f51-413c-9927-942272ca3366", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/game/heros/magic.prefab b/assets/resources/game/heros/magic.prefab index 71125945..c5cbb0b9 100644 --- a/assets/resources/game/heros/magic.prefab +++ b/assets/resources/game/heros/magic.prefab @@ -315,10 +315,10 @@ "a": 255 }, "_skeletonData": { - "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__uuid__": "17e711b6-d84d-4ff4-b043-e7928c5ef1b3", "__expectedType__": "sp.SkeletonData" }, - "defaultSkin": "heath", + "defaultSkin": "magic", "defaultAnimation": "idle", "_premultipliedAlpha": false, "_timeScale": 1, diff --git a/assets/resources/game/heros/magic/skeleton.atlas b/assets/resources/game/heros/magic/skeleton.atlas new file mode 100644 index 00000000..62d1b55c --- /dev/null +++ b/assets/resources/game/heros/magic/skeleton.atlas @@ -0,0 +1,34 @@ + +skeleton.png +size: 1271,324 +format: RGBA8888 +filter: Linear,Linear +repeat: none +hb_01 + rotate: false + xy: 2, 2 + size: 320, 320 + orig: 320, 320 + offset: 0, 0 + index: -1 +hb_02 + rotate: false + xy: 645, 10 + size: 312, 312 + orig: 320, 320 + offset: 1, 4 + index: -1 +hb_03 + rotate: true + xy: 324, 2 + size: 320, 319 + orig: 320, 320 + offset: 0, 1 + index: -1 +hb_04 + rotate: false + xy: 959, 12 + size: 310, 310 + orig: 320, 320 + offset: 2, 8 + index: -1 diff --git a/assets/resources/game/heros/magic/skeleton.atlas.meta b/assets/resources/game/heros/magic/skeleton.atlas.meta new file mode 100644 index 00000000..92b4a049 --- /dev/null +++ b/assets/resources/game/heros/magic/skeleton.atlas.meta @@ -0,0 +1 @@ +{"ver":"1.0.1","importer":"*","imported":true,"uuid":"f2c1a17c-5c28-446c-83a6-34a71fa7dec5","files":[".atlas",".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/magic/skeleton.json b/assets/resources/game/heros/magic/skeleton.json new file mode 100644 index 00000000..6ef9e551 --- /dev/null +++ b/assets/resources/game/heros/magic/skeleton.json @@ -0,0 +1,99 @@ +{ +"skeleton": { + "hash": "fYDeOpztoYDiS0D+OqdbTuJk36Y", + "spine": "3.8.99", + "x": -170, + "y": -170, + "width": 320, + "height": 320, + "images": "", + "audio": "" +}, +"bones": [ + { "name": "root", "x": -10, "y": -10 } +], +"slots": [ + { "name": "hero_background", "bone": "root", "attachment": "hb_03" } +], +"skins": [ + { + "name": "heath", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_04", "width": 320, "height": 320 } + } + } + }, + { + "name": "magic", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_01", "x": -0.1, "y": 0.19, "width": 320, "height": 320 } + } + } + }, + { + "name": "monster", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_02", "width": 320, "height": 320 } + } + } + }, + { + "name": "war", + "attachments": { + "hero_background": { + "hb_03": { "width": 320, "height": 320 } + } + } + } +], +"animations": { + "act1": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3333, "x": -20 }, + { "time": 0.5667, "x": 40 }, + { "time": 0.8 } + ] + } + } + }, + "idle": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.5, "y": 8 }, + { "time": 1 } + ] + } + } + }, + "magic1": { + "bones": { + "root": { + "rotate": [ + {}, + { "time": 0.5, "angle": 15 }, + { "time": 1 } + ] + } + } + }, + "move": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3667, "y": 15 }, + { "time": 0.8 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/assets/resources/game/heros/magic/skeleton.json.meta b/assets/resources/game/heros/magic/skeleton.json.meta new file mode 100644 index 00000000..ba49db2a --- /dev/null +++ b/assets/resources/game/heros/magic/skeleton.json.meta @@ -0,0 +1 @@ +{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"17e711b6-d84d-4ff4-b043-e7928c5ef1b3","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/magic/skeleton.png b/assets/resources/game/heros/magic/skeleton.png new file mode 100644 index 00000000..60444402 Binary files /dev/null and b/assets/resources/game/heros/magic/skeleton.png differ diff --git a/assets/resources/game/heros/magic/skeleton.png.meta b/assets/resources/game/heros/magic/skeleton.png.meta new file mode 100644 index 00000000..7a01b372 --- /dev/null +++ b/assets/resources/game/heros/magic/skeleton.png.meta @@ -0,0 +1,42 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "d3fde7d2-a222-40ab-92db-b6f5ce1b6934", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d3fde7d2-a222-40ab-92db-b6f5ce1b6934@6c48a", + "displayName": "skeleton", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "d3fde7d2-a222-40ab-92db-b6f5ce1b6934", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "texture", + "fixAlphaTransparencyArtifacts": false, + "redirect": "d3fde7d2-a222-40ab-92db-b6f5ce1b6934@6c48a" + } +} diff --git a/assets/resources/game/heros/war.meta b/assets/resources/game/heros/war.meta new file mode 100644 index 00000000..f3311a70 --- /dev/null +++ b/assets/resources/game/heros/war.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "b4872ab4-d44d-4b30-8d27-0638078b6371", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/game/heros/war.prefab b/assets/resources/game/heros/war.prefab index d08d8ab9..e04ed5da 100644 --- a/assets/resources/game/heros/war.prefab +++ b/assets/resources/game/heros/war.prefab @@ -315,10 +315,10 @@ "a": 255 }, "_skeletonData": { - "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__uuid__": "a71075a2-74ca-44c5-82f3-9098b70b8108", "__expectedType__": "sp.SkeletonData" }, - "defaultSkin": "heath", + "defaultSkin": "monster", "defaultAnimation": "idle", "_premultipliedAlpha": false, "_timeScale": 1, diff --git a/assets/resources/game/heros/war/skeleton.atlas b/assets/resources/game/heros/war/skeleton.atlas new file mode 100644 index 00000000..62d1b55c --- /dev/null +++ b/assets/resources/game/heros/war/skeleton.atlas @@ -0,0 +1,34 @@ + +skeleton.png +size: 1271,324 +format: RGBA8888 +filter: Linear,Linear +repeat: none +hb_01 + rotate: false + xy: 2, 2 + size: 320, 320 + orig: 320, 320 + offset: 0, 0 + index: -1 +hb_02 + rotate: false + xy: 645, 10 + size: 312, 312 + orig: 320, 320 + offset: 1, 4 + index: -1 +hb_03 + rotate: true + xy: 324, 2 + size: 320, 319 + orig: 320, 320 + offset: 0, 1 + index: -1 +hb_04 + rotate: false + xy: 959, 12 + size: 310, 310 + orig: 320, 320 + offset: 2, 8 + index: -1 diff --git a/assets/resources/game/heros/war/skeleton.atlas.meta b/assets/resources/game/heros/war/skeleton.atlas.meta new file mode 100644 index 00000000..acbbf939 --- /dev/null +++ b/assets/resources/game/heros/war/skeleton.atlas.meta @@ -0,0 +1 @@ +{"ver":"1.0.1","importer":"*","imported":true,"uuid":"375ddb2c-62cd-4fdc-bae3-ee6227c9ab29","files":[".atlas",".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/war/skeleton.json b/assets/resources/game/heros/war/skeleton.json new file mode 100644 index 00000000..6ef9e551 --- /dev/null +++ b/assets/resources/game/heros/war/skeleton.json @@ -0,0 +1,99 @@ +{ +"skeleton": { + "hash": "fYDeOpztoYDiS0D+OqdbTuJk36Y", + "spine": "3.8.99", + "x": -170, + "y": -170, + "width": 320, + "height": 320, + "images": "", + "audio": "" +}, +"bones": [ + { "name": "root", "x": -10, "y": -10 } +], +"slots": [ + { "name": "hero_background", "bone": "root", "attachment": "hb_03" } +], +"skins": [ + { + "name": "heath", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_04", "width": 320, "height": 320 } + } + } + }, + { + "name": "magic", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_01", "x": -0.1, "y": 0.19, "width": 320, "height": 320 } + } + } + }, + { + "name": "monster", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_02", "width": 320, "height": 320 } + } + } + }, + { + "name": "war", + "attachments": { + "hero_background": { + "hb_03": { "width": 320, "height": 320 } + } + } + } +], +"animations": { + "act1": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3333, "x": -20 }, + { "time": 0.5667, "x": 40 }, + { "time": 0.8 } + ] + } + } + }, + "idle": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.5, "y": 8 }, + { "time": 1 } + ] + } + } + }, + "magic1": { + "bones": { + "root": { + "rotate": [ + {}, + { "time": 0.5, "angle": 15 }, + { "time": 1 } + ] + } + } + }, + "move": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3667, "y": 15 }, + { "time": 0.8 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/assets/resources/game/heros/war/skeleton.json.meta b/assets/resources/game/heros/war/skeleton.json.meta new file mode 100644 index 00000000..3b0cc2c5 --- /dev/null +++ b/assets/resources/game/heros/war/skeleton.json.meta @@ -0,0 +1 @@ +{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"a71075a2-74ca-44c5-82f3-9098b70b8108","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/heros/war/skeleton.png b/assets/resources/game/heros/war/skeleton.png new file mode 100644 index 00000000..60444402 Binary files /dev/null and b/assets/resources/game/heros/war/skeleton.png differ diff --git a/assets/resources/game/heros/war/skeleton.png.meta b/assets/resources/game/heros/war/skeleton.png.meta new file mode 100644 index 00000000..273e0ae8 --- /dev/null +++ b/assets/resources/game/heros/war/skeleton.png.meta @@ -0,0 +1,42 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "911c45f2-0418-4291-8bbd-ef8716c5f34d", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "911c45f2-0418-4291-8bbd-ef8716c5f34d@6c48a", + "displayName": "skeleton", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "911c45f2-0418-4291-8bbd-ef8716c5f34d", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "texture", + "fixAlphaTransparencyArtifacts": false, + "redirect": "911c45f2-0418-4291-8bbd-ef8716c5f34d@6c48a" + } +} diff --git a/assets/resources/game/monster/monster.prefab b/assets/resources/game/monster/monster.prefab index f9bfe03a..c585ffc3 100644 --- a/assets/resources/game/monster/monster.prefab +++ b/assets/resources/game/monster/monster.prefab @@ -315,7 +315,7 @@ "a": 255 }, "_skeletonData": { - "__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce", + "__uuid__": "6683952a-05cc-4103-9cfd-dbd67fea128a", "__expectedType__": "sp.SkeletonData" }, "defaultSkin": "war", diff --git a/assets/resources/game/monster/spine.meta b/assets/resources/game/monster/spine.meta new file mode 100644 index 00000000..e7cc043a --- /dev/null +++ b/assets/resources/game/monster/spine.meta @@ -0,0 +1 @@ +{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"2f43601d-548f-4b60-8db5-4fd7715916b6","files":[],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/monster/spine/animator.json b/assets/resources/game/monster/spine/animator.json new file mode 100644 index 00000000..483659a2 --- /dev/null +++ b/assets/resources/game/monster/spine/animator.json @@ -0,0 +1,154 @@ +{ + "animator": "1.0.0", + "mainStateMachine": { + "layerPos": [ + 0, + 0 + ], + "layerScale": 1, + "anyStatePos": [ + -660, + 390 + ], + "subStates": [ + "act1", + "idle", + "magic1", + "move" + ], + "subStateMachines": [] + }, + "subStateMachines": [], + "defaultState": "idle", + "anyState": { + "transitions": [] + }, + "states": [ + { + "position": [ + -180, + 420 + ], + "upStateMachine": "BaseLayer", + "state": "act1", + "motion": "act1", + "speed": 1, + "multiplier": "", + "loop": false, + "transitions": [ + { + "toState": "idle", + "hasExitTime": true, + "conditions": [] + } + ] + }, + { + "position": [ + -390, + 240 + ], + "upStateMachine": "BaseLayer", + "state": "idle", + "motion": "idle", + "speed": 1, + "multiplier": "", + "loop": true, + "transitions": [ + { + "toState": "move", + "hasExitTime": false, + "conditions": [ + { + "param": "act1", + "value": 0, + "logic": 0 + } + ] + }, + { + "toState": "act1", + "hasExitTime": false, + "conditions": [ + { + "param": "magic1", + "value": 0, + "logic": 0 + } + ] + }, + { + "toState": "magic1", + "hasExitTime": false, + "conditions": [ + { + "param": "move", + "value": 0, + "logic": 0 + } + ] + } + ] + }, + { + "position": [ + 60, + 180 + ], + "upStateMachine": "BaseLayer", + "state": "magic1", + "motion": "magic1", + "speed": 1, + "multiplier": "", + "loop": false, + "transitions": [ + { + "toState": "idle", + "hasExitTime": true, + "conditions": [] + } + ] + }, + { + "position": [ + -240, + 0 + ], + "upStateMachine": "BaseLayer", + "state": "move", + "motion": "move", + "speed": 1, + "multiplier": "", + "loop": false, + "transitions": [ + { + "toState": "idle", + "hasExitTime": true, + "conditions": [] + } + ] + } + ], + "parameters": [ + { + "param": "act1", + "type": 3, + "init": 0 + }, + { + "param": "magic1", + "type": 3, + "init": 0 + }, + { + "param": "move", + "type": 3, + "init": 0 + }, + { + "param": "idle", + "type": 3, + "init": 0 + } + ] +} \ No newline at end of file diff --git a/assets/resources/game/monster/spine/animator.json.meta b/assets/resources/game/monster/spine/animator.json.meta new file mode 100644 index 00000000..19dfc01b --- /dev/null +++ b/assets/resources/game/monster/spine/animator.json.meta @@ -0,0 +1 @@ +{"ver":"2.0.1","importer":"json","imported":true,"uuid":"ce02d24b-929d-41cb-a63f-49458f0b237f","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/monster/spine/skeleton.atlas b/assets/resources/game/monster/spine/skeleton.atlas new file mode 100644 index 00000000..62d1b55c --- /dev/null +++ b/assets/resources/game/monster/spine/skeleton.atlas @@ -0,0 +1,34 @@ + +skeleton.png +size: 1271,324 +format: RGBA8888 +filter: Linear,Linear +repeat: none +hb_01 + rotate: false + xy: 2, 2 + size: 320, 320 + orig: 320, 320 + offset: 0, 0 + index: -1 +hb_02 + rotate: false + xy: 645, 10 + size: 312, 312 + orig: 320, 320 + offset: 1, 4 + index: -1 +hb_03 + rotate: true + xy: 324, 2 + size: 320, 319 + orig: 320, 320 + offset: 0, 1 + index: -1 +hb_04 + rotate: false + xy: 959, 12 + size: 310, 310 + orig: 320, 320 + offset: 2, 8 + index: -1 diff --git a/assets/resources/game/monster/spine/skeleton.atlas.meta b/assets/resources/game/monster/spine/skeleton.atlas.meta new file mode 100644 index 00000000..d0675526 --- /dev/null +++ b/assets/resources/game/monster/spine/skeleton.atlas.meta @@ -0,0 +1 @@ +{"ver":"1.0.1","importer":"*","imported":true,"uuid":"f87ad63c-320c-4ca5-b18a-79f174843462","files":[".atlas",".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/monster/spine/skeleton.json b/assets/resources/game/monster/spine/skeleton.json new file mode 100644 index 00000000..6ef9e551 --- /dev/null +++ b/assets/resources/game/monster/spine/skeleton.json @@ -0,0 +1,99 @@ +{ +"skeleton": { + "hash": "fYDeOpztoYDiS0D+OqdbTuJk36Y", + "spine": "3.8.99", + "x": -170, + "y": -170, + "width": 320, + "height": 320, + "images": "", + "audio": "" +}, +"bones": [ + { "name": "root", "x": -10, "y": -10 } +], +"slots": [ + { "name": "hero_background", "bone": "root", "attachment": "hb_03" } +], +"skins": [ + { + "name": "heath", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_04", "width": 320, "height": 320 } + } + } + }, + { + "name": "magic", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_01", "x": -0.1, "y": 0.19, "width": 320, "height": 320 } + } + } + }, + { + "name": "monster", + "attachments": { + "hero_background": { + "hb_03": { "name": "hb_02", "width": 320, "height": 320 } + } + } + }, + { + "name": "war", + "attachments": { + "hero_background": { + "hb_03": { "width": 320, "height": 320 } + } + } + } +], +"animations": { + "act1": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3333, "x": -20 }, + { "time": 0.5667, "x": 40 }, + { "time": 0.8 } + ] + } + } + }, + "idle": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.5, "y": 8 }, + { "time": 1 } + ] + } + } + }, + "magic1": { + "bones": { + "root": { + "rotate": [ + {}, + { "time": 0.5, "angle": 15 }, + { "time": 1 } + ] + } + } + }, + "move": { + "bones": { + "root": { + "translate": [ + {}, + { "time": 0.3667, "y": 15 }, + { "time": 0.8 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/assets/resources/game/monster/spine/skeleton.json.meta b/assets/resources/game/monster/spine/skeleton.json.meta new file mode 100644 index 00000000..60fbfbfd --- /dev/null +++ b/assets/resources/game/monster/spine/skeleton.json.meta @@ -0,0 +1 @@ +{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"6683952a-05cc-4103-9cfd-dbd67fea128a","files":[".json"],"subMetas":{},"userData":{}} diff --git a/assets/resources/game/monster/spine/skeleton.png b/assets/resources/game/monster/spine/skeleton.png new file mode 100644 index 00000000..60444402 Binary files /dev/null and b/assets/resources/game/monster/spine/skeleton.png differ diff --git a/assets/resources/game/monster/spine/skeleton.png.meta b/assets/resources/game/monster/spine/skeleton.png.meta new file mode 100644 index 00000000..b305fcbb --- /dev/null +++ b/assets/resources/game/monster/spine/skeleton.png.meta @@ -0,0 +1,42 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "94eb7a7d-f511-437e-84f0-6ce986da145c", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "94eb7a7d-f511-437e-84f0-6ce986da145c@6c48a", + "displayName": "skeleton", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "94eb7a7d-f511-437e-84f0-6ce986da145c", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "texture", + "fixAlphaTransparencyArtifacts": false, + "redirect": "94eb7a7d-f511-437e-84f0-6ce986da145c@6c48a" + } +} diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 5e315b12..31139bf2 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -24,7 +24,12 @@ export class Main extends Root { protected async run() { smc.initialize = ecs.getEntity(Initialize); smc.monsters = ['war','magic','heath'] - smc.heros = ['war','magic','heath'] + smc.heros = [ + {profession:'war',speed:60}, + {profession:'magic',speed:60}, + {profession:'heath',speed:60}, + {profession:'war',speed:60}, + ] console.log("Game start"); } protected initGui() { diff --git a/assets/script/game/heros/Hero.ts b/assets/script/game/heros/Hero.ts new file mode 100644 index 00000000..6aedf780 --- /dev/null +++ b/assets/script/game/heros/Hero.ts @@ -0,0 +1,63 @@ + +/* + * @Author: dgflash + * @Date: 2021-11-18 17:47:56 + * @LastEditors: dgflash + * @LastEditTime: 2022-08-04 15:43:04 + */ +import { instantiate, Node, Prefab, tween, Vec3,Label } 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 { HeroModelComp } from "./HeroModelComp"; +import { HeroSpine } from "./HeroSpine"; +import { HeroViewComp } from "./HeroViewComp"; + +/** 角色实体 */ +@ecs.register(`Hero`) +export class Hero extends ecs.Entity { + // 数据层 + HeroModel!: HeroModelComp; + // 视图层 + HeroView!: HeroViewComp; + + protected init() { + this.addComponents( + HeroModelComp); + } + + destroy(): void { + this.remove(HeroViewComp); + super.destroy(); + } + + /** 加载角色 */ + load(pos: Vec3 = Vec3.ZERO,profession:string = "war") { + var path = "game/heros/"+profession; + var prefab: Prefab = oops.res.get(path, Prefab)!; + var node = instantiate(prefab); + let label =node.getChildByName("top").getChildByName("lab_name") + label.getComponent(Label)!.string = profession; + var scene = smc.map.MapView.scene; + node.parent = scene.entityLayer!.node!; + var as = node.getComponent(HeroSpine); + node.setPosition(pos) + node.setScale(1, 1, 1); + var mv = node.getComponent(HeroViewComp)!; + this.add(mv); + let speed = smc.heros[0].speed; + tween(node).to(speed/60, { position: new Vec3(0, -60, 0) }, { + onComplete: () => { + // this.as.walk(); + } + }).start(); + //移除全局列表 + smc.heros.splice(0,1) + console.log(ecs.query(ecs.allOf(HeroViewComp)) + ) + } + + +} \ No newline at end of file diff --git a/assets/script/game/heros/Hero.ts.meta b/assets/script/game/heros/Hero.ts.meta new file mode 100644 index 00000000..618089a0 --- /dev/null +++ b/assets/script/game/heros/Hero.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"984e9949-2b16-4e46-bb30-6ac00a2a838e","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/heros/HeroModelComp.ts b/assets/script/game/heros/HeroModelComp.ts new file mode 100644 index 00000000..ad839ced --- /dev/null +++ b/assets/script/game/heros/HeroModelComp.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('HeroModel') +export class HeroModelComp extends ecs.Comp { + /** 角色编号 */ + id: number = -1; + + /** 角色名 */ + name: string = "Hero"; + + /** 动画名资源 */ + anim: string = "Hero"; + + reset() { + this.id = -1; + this.name = ""; + } +} diff --git a/assets/script/game/heros/HeroModelComp.ts.meta b/assets/script/game/heros/HeroModelComp.ts.meta new file mode 100644 index 00000000..d161eb3c --- /dev/null +++ b/assets/script/game/heros/HeroModelComp.ts.meta @@ -0,0 +1 @@ +{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"0ce59d56-a495-4b95-9405-a8a85d47a439","files":[],"subMetas":{},"userData":{}} diff --git a/assets/script/game/heros/HeroViewComp.ts b/assets/script/game/heros/HeroViewComp.ts index 7796045c..738b6afb 100644 --- a/assets/script/game/heros/HeroViewComp.ts +++ b/assets/script/game/heros/HeroViewComp.ts @@ -5,7 +5,7 @@ * @LastEditTime: 2022-08-17 12:36:18 */ -import { Vec3, _decorator } from "cc"; +import { Vec3, _decorator ,tween} 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"; @@ -23,6 +23,7 @@ export class HeroViewComp extends CCComp { /** 视图层逻辑代码分离演示 */ onLoad() { this.as = this.getComponent(HeroSpine); + } diff --git a/assets/script/game/map/view/MapViewComp.ts b/assets/script/game/map/view/MapViewComp.ts index 5fcc3dc2..4098d0bc 100644 --- a/assets/script/game/map/view/MapViewComp.ts +++ b/assets/script/game/map/view/MapViewComp.ts @@ -3,7 +3,8 @@ 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 { Monster } from "../../monster/Monster"; +import { Hero } from "../../heros/Hero"; // import MapRoadUtils from "./map/road/MapRoadUtils"; import { MapViewScene } from "./MapViewScene"; import { Timer } from "../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer"; @@ -45,69 +46,28 @@ export class MapViewComp extends CCComp { } /** 添加玩家 */ - private addHero(pos?: Vec3) { + private addHero() { 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(Hero); + hero.load(v3(-360,-60), smc.heros[0].profession); + + } + if (smc.monsters.length>0){ let monster = ecs.getEntity(Monster); - let x = this.getRandomInt(-100, 100) - monster.load(this.aStarToVec3(x+',-60')); + monster.load(v3(360,-60)); + smc.monsters.splice(0,1) } - - // smc.own.loadJoystick(); - // smc.heros.forEach(element => { - // var heros$i = ecs.getEntity(Role); - // let i =1 - // switch (element) { - // case "war": - // heros$i.load(this.aStarToVec3("-30,-60"), false); - // break; - // case "magic": - // heros$i.load(this.aStarToVec3("-140,-60"), false); - // break; - // case "heath": - // heros$i.load(this.aStarToVec3("-230,-60"), false) - // } - // i=i+1 - // }); - // let x = 1 - // smc.monsters.forEach(element => { - // var monsters$x = ecs.getEntity(Role); - // switch (element) { - // case "war": - // monsters$x.load(this.aStarToVec3("30,-60"), true); - // break; - // case "magic": - // monsters$x.load(this.aStarToVec3("140,-60"), true); - // break; - // case "heath": - // monsters$x.load(this.aStarToVec3("230,-60"), true) - // } - // x=x+1 - // }); - - + } private getRandomInt(min: number, max: number): number { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; } - private aStarToVec3(str: string) { - let array = str.split(","); - let x = parseInt(array[0]); - let y = parseInt(array[1]); - // let p = MapRoadUtils.instance.getPixelByDerect(x, y); - return v3(x, y); - } - - } diff --git a/assets/script/game/monster/Monster.ts b/assets/script/game/monster/Monster.ts index ef4c6edd..ceb2b3bc 100644 --- a/assets/script/game/monster/Monster.ts +++ b/assets/script/game/monster/Monster.ts @@ -5,7 +5,7 @@ * @LastEditors: dgflash * @LastEditTime: 2022-08-04 15:43:04 */ -import { instantiate, Node, Prefab, Vec3 } from "cc"; +import { instantiate, Node, Prefab, Vec3 ,tween} 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"; @@ -14,7 +14,7 @@ import { smc } from "../common/SingletonModuleComp"; import { MonsterModelComp } from "./MonsterModelComp"; import { MonsterSpine } from "./MonsterSpine"; import { MonsterViewComp } from "./MonsterViewComp"; - +import { MoveTo } from "../../../../extensions/oops-plugin-framework/assets/libs/animator-move/MoveTo"; /** 角色实体 */ @ecs.register(`Monster`) export class Monster extends ecs.Entity { @@ -48,7 +48,12 @@ export class Monster extends ecs.Entity { var mv = node.getComponent(MonsterViewComp)!; this.add(mv); node.setScale(-1, 1, 1); + tween(node).to(1, { position: new Vec3(0, -60, 0) }, { + onComplete: () => { + // this.as.walk(); + } + }).start(); } - + } \ No newline at end of file diff --git a/assets/script/game/monster/MonsterViewComp.ts b/assets/script/game/monster/MonsterViewComp.ts index 8aded8b5..76983631 100644 --- a/assets/script/game/monster/MonsterViewComp.ts +++ b/assets/script/game/monster/MonsterViewComp.ts @@ -5,7 +5,7 @@ * @LastEditTime: 2022-08-17 12:36:18 */ -import { Vec3, _decorator } from "cc"; +import { Vec3, _decorator ,tween} 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 { MonsterSpine } from "./MonsterSpine"; @@ -23,6 +23,8 @@ export class MonsterViewComp extends CCComp { /** 视图层逻辑代码分离演示 */ onLoad() { this.as = this.getComponent(MonsterSpine); + //移动到0,-60 + } diff --git a/assets/script/game/role/view/RoleSpineAnimator.ts b/assets/script/game/role/view/RoleSpineAnimator.ts index bafc2f45..0be16783 100644 --- a/assets/script/game/role/view/RoleSpineAnimator.ts +++ b/assets/script/game/role/view/RoleSpineAnimator.ts @@ -23,51 +23,6 @@ export default class RoleSpineAnimator extends Component { this.spine = this.getComponent(sp.Skeleton)!; console.log("RoleSpineAnimator start smc.heros",smc.heros); - let heros=smc.heros - if(heros.length>0){ - /** - * 取第一个heros - */ - - this.spine.setSkin(heros[0]) - console.log("RoleSpineAnimator setSkin", heros[0]); - switch (heros[0]) { - case 'war': - this.spine.setAnimation(0, 'idle', true) - break; - case 'magic': - this.spine.setAnimation(0, 'idle', true) - break; - case 'heath': - this.spine.setAnimation(0, 'idle', true) - break; - default: - this.spine.setAnimation(0, 'idle', true) - break; - } - //移除smc.heros[0],heros key 重新取 - heros.splice(0,1) - smc.heros=heros - - }else if(smc.monsters.length>0){ - this.spine.setSkin(smc.monsters[0]) - console.log("RoleSpineAnimator setSkin", smc.monsters[0]); - switch (smc.monsters[0]) { - case 'war': - this.spine.setAnimation(0, 'idle', true) - break; - case 'magic': - this.spine.setAnimation(0, 'idle', true) - break; - case 'heath': - this.spine.setAnimation(0, 'idle', true) - break; - default: - this.spine.setAnimation(0, 'idle', true) - break; - } - } - } lateUpdate(dt: number) {