背后载入
This commit is contained in:
9
assets/resources/game/heros/heath.meta
Normal file
9
assets/resources/game/heros/heath.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "8acb3fd5-26f2-4436-b699-0f755a10bc98",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -315,7 +315,7 @@
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce",
|
||||
"__uuid__": "8e6ee39e-8b23-4562-846f-ad44c2bddb09",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "heath",
|
||||
|
||||
34
assets/resources/game/heros/heath/skeleton.atlas
Normal file
34
assets/resources/game/heros/heath/skeleton.atlas
Normal file
@@ -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
|
||||
1
assets/resources/game/heros/heath/skeleton.atlas.meta
Normal file
1
assets/resources/game/heros/heath/skeleton.atlas.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.0.1","importer":"*","imported":true,"uuid":"c73188bd-afda-4450-945f-1c1b442c561a","files":[".atlas",".json"],"subMetas":{},"userData":{}}
|
||||
99
assets/resources/game/heros/heath/skeleton.json
Normal file
99
assets/resources/game/heros/heath/skeleton.json
Normal file
@@ -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 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
assets/resources/game/heros/heath/skeleton.json.meta
Normal file
1
assets/resources/game/heros/heath/skeleton.json.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"8e6ee39e-8b23-4562-846f-ad44c2bddb09","files":[".json"],"subMetas":{},"userData":{}}
|
||||
BIN
assets/resources/game/heros/heath/skeleton.png
Normal file
BIN
assets/resources/game/heros/heath/skeleton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 497 KiB |
42
assets/resources/game/heros/heath/skeleton.png.meta
Normal file
42
assets/resources/game/heros/heath/skeleton.png.meta
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
9
assets/resources/game/heros/magic.meta
Normal file
9
assets/resources/game/heros/magic.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "85cd5c8a-4f51-413c-9927-942272ca3366",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
34
assets/resources/game/heros/magic/skeleton.atlas
Normal file
34
assets/resources/game/heros/magic/skeleton.atlas
Normal file
@@ -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
|
||||
1
assets/resources/game/heros/magic/skeleton.atlas.meta
Normal file
1
assets/resources/game/heros/magic/skeleton.atlas.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.0.1","importer":"*","imported":true,"uuid":"f2c1a17c-5c28-446c-83a6-34a71fa7dec5","files":[".atlas",".json"],"subMetas":{},"userData":{}}
|
||||
99
assets/resources/game/heros/magic/skeleton.json
Normal file
99
assets/resources/game/heros/magic/skeleton.json
Normal file
@@ -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 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
assets/resources/game/heros/magic/skeleton.json.meta
Normal file
1
assets/resources/game/heros/magic/skeleton.json.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"17e711b6-d84d-4ff4-b043-e7928c5ef1b3","files":[".json"],"subMetas":{},"userData":{}}
|
||||
BIN
assets/resources/game/heros/magic/skeleton.png
Normal file
BIN
assets/resources/game/heros/magic/skeleton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 497 KiB |
42
assets/resources/game/heros/magic/skeleton.png.meta
Normal file
42
assets/resources/game/heros/magic/skeleton.png.meta
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
9
assets/resources/game/heros/war.meta
Normal file
9
assets/resources/game/heros/war.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "b4872ab4-d44d-4b30-8d27-0638078b6371",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
34
assets/resources/game/heros/war/skeleton.atlas
Normal file
34
assets/resources/game/heros/war/skeleton.atlas
Normal file
@@ -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
|
||||
1
assets/resources/game/heros/war/skeleton.atlas.meta
Normal file
1
assets/resources/game/heros/war/skeleton.atlas.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.0.1","importer":"*","imported":true,"uuid":"375ddb2c-62cd-4fdc-bae3-ee6227c9ab29","files":[".atlas",".json"],"subMetas":{},"userData":{}}
|
||||
99
assets/resources/game/heros/war/skeleton.json
Normal file
99
assets/resources/game/heros/war/skeleton.json
Normal file
@@ -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 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
assets/resources/game/heros/war/skeleton.json.meta
Normal file
1
assets/resources/game/heros/war/skeleton.json.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"a71075a2-74ca-44c5-82f3-9098b70b8108","files":[".json"],"subMetas":{},"userData":{}}
|
||||
BIN
assets/resources/game/heros/war/skeleton.png
Normal file
BIN
assets/resources/game/heros/war/skeleton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 497 KiB |
42
assets/resources/game/heros/war/skeleton.png.meta
Normal file
42
assets/resources/game/heros/war/skeleton.png.meta
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,7 @@
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "52673d05-5225-4ac6-98e4-efe6494452ce",
|
||||
"__uuid__": "6683952a-05cc-4103-9cfd-dbd67fea128a",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "war",
|
||||
|
||||
1
assets/resources/game/monster/spine.meta
Normal file
1
assets/resources/game/monster/spine.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"2f43601d-548f-4b60-8db5-4fd7715916b6","files":[],"subMetas":{},"userData":{}}
|
||||
154
assets/resources/game/monster/spine/animator.json
Normal file
154
assets/resources/game/monster/spine/animator.json
Normal file
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
1
assets/resources/game/monster/spine/animator.json.meta
Normal file
1
assets/resources/game/monster/spine/animator.json.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"2.0.1","importer":"json","imported":true,"uuid":"ce02d24b-929d-41cb-a63f-49458f0b237f","files":[".json"],"subMetas":{},"userData":{}}
|
||||
34
assets/resources/game/monster/spine/skeleton.atlas
Normal file
34
assets/resources/game/monster/spine/skeleton.atlas
Normal file
@@ -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
|
||||
1
assets/resources/game/monster/spine/skeleton.atlas.meta
Normal file
1
assets/resources/game/monster/spine/skeleton.atlas.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.0.1","importer":"*","imported":true,"uuid":"f87ad63c-320c-4ca5-b18a-79f174843462","files":[".atlas",".json"],"subMetas":{},"userData":{}}
|
||||
99
assets/resources/game/monster/spine/skeleton.json
Normal file
99
assets/resources/game/monster/spine/skeleton.json
Normal file
@@ -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 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
assets/resources/game/monster/spine/skeleton.json.meta
Normal file
1
assets/resources/game/monster/spine/skeleton.json.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"1.2.6","importer":"spine-data","imported":true,"uuid":"6683952a-05cc-4103-9cfd-dbd67fea128a","files":[".json"],"subMetas":{},"userData":{}}
|
||||
BIN
assets/resources/game/monster/spine/skeleton.png
Normal file
BIN
assets/resources/game/monster/spine/skeleton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 497 KiB |
42
assets/resources/game/monster/spine/skeleton.png.meta
Normal file
42
assets/resources/game/monster/spine/skeleton.png.meta
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,12 @@ export class Main extends Root {
|
||||
protected async run() {
|
||||
smc.initialize = ecs.getEntity<Initialize>(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() {
|
||||
|
||||
63
assets/script/game/heros/Hero.ts
Normal file
63
assets/script/game/heros/Hero.ts
Normal file
@@ -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<ecs.Comp>(
|
||||
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))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
1
assets/script/game/heros/Hero.ts.meta
Normal file
1
assets/script/game/heros/Hero.ts.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"984e9949-2b16-4e46-bb30-6ac00a2a838e","files":[],"subMetas":{},"userData":{}}
|
||||
27
assets/script/game/heros/HeroModelComp.ts
Normal file
27
assets/script/game/heros/HeroModelComp.ts
Normal file
@@ -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 = "";
|
||||
}
|
||||
}
|
||||
1
assets/script/game/heros/HeroModelComp.ts.meta
Normal file
1
assets/script/game/heros/HeroModelComp.ts.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"0ce59d56-a495-4b95-9405-a8a85d47a439","files":[],"subMetas":{},"userData":{}}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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>(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);
|
||||
hero.load(v3(-360,-60), smc.heros[0].profession);
|
||||
|
||||
}
|
||||
|
||||
if (smc.monsters.length>0){
|
||||
let monster = ecs.getEntity<Monster>(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>(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>(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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user