fix:编辑器文件导入. add:example,runtime

This commit is contained in:
YipLee
2021-01-24 19:29:37 +08:00
parent c232a91a41
commit 91f4d8011b
214 changed files with 41328 additions and 120 deletions

53
examples/example2-2-2/.gitignore vendored Normal file
View File

@@ -0,0 +1,53 @@
#/////////////////////////////////////////////////////////////////////////////
# Fireball Projects
#/////////////////////////////////////////////////////////////////////////////
/library/
/temp/
/local/
/build/
#/////////////////////////////////////////////////////////////////////////////
# npm files
#/////////////////////////////////////////////////////////////////////////////
npm-debug.log
node_modules/
#/////////////////////////////////////////////////////////////////////////////
# Logs and databases
#/////////////////////////////////////////////////////////////////////////////
*.log
*.sql
*.sqlite
#/////////////////////////////////////////////////////////////////////////////
# files for debugger
#/////////////////////////////////////////////////////////////////////////////
*.sln
*.csproj
*.pidb
*.unityproj
*.suo
#/////////////////////////////////////////////////////////////////////////////
# OS generated files
#/////////////////////////////////////////////////////////////////////////////
.DS_Store
ehthumbs.db
Thumbs.db
#/////////////////////////////////////////////////////////////////////////////
# WebStorm files
#/////////////////////////////////////////////////////////////////////////////
.idea/
#//////////////////////////
# VS Code files
#//////////////////////////
.vscode/

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "6f7a4dfa-6f65-4255-aed8-4a2902f84601",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "a835cdc7-50a5-416b-8090-4f35d54dfc78",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"animator":"1.0.0","mainStateMachine":{"layerPos":[-68.23754226233478,-21.050174637417967],"layerScale":1.2000000000000002,"anyStatePos":[-300,300],"subStates":["sheep_hit","sheep_idle","sheep_run"],"subStateMachines":[]},"subStateMachines":[],"defaultState":"sheep_idle","anyState":{"transitions":[{"toState":"sheep_hit","hasExitTime":false,"conditions":[{"param":"hit","value":0,"logic":0}]}]},"states":[{"position":[210,60],"upStateMachine":"BaseLayer","state":"sheep_hit","motion":"sheep_hit","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"sheep_idle","hasExitTime":true,"conditions":[]}]},{"position":[-240,60],"upStateMachine":"BaseLayer","state":"sheep_idle","motion":"sheep_idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"sheep_run","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":2}]}]},{"position":[-240,-120],"upStateMachine":"BaseLayer","state":"sheep_run","motion":"sheep_run","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"sheep_idle","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":0}]}]}],"parameters":[{"param":"speed","type":2,"init":0},{"param":"hit","type":3,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "43806a1f-7be5-4bf1-9477-95e699fea019",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"defaultState":"sheep_idle","anyState":{"transitions":[{"toState":"sheep_hit","hasExitTime":false,"conditions":[{"param":"hit","value":0,"logic":0}]}]},"states":[{"state":"sheep_hit","motion":"sheep_hit","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"sheep_idle","hasExitTime":true,"conditions":[]}]},{"state":"sheep_idle","motion":"sheep_idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"sheep_run","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":2}]}]},{"state":"sheep_run","motion":"sheep_run","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"sheep_idle","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":0}]}]}],"parameters":[{"param":"speed","type":2,"init":0},{"param":"hit","type":3,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "eafb4a36-50c1-4417-b90a-234e6a57e0ba",
"subMetas": {}
}

View File

@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>frames</key>
<dict>
<key>sheep_down_0.png</key>
<dict>
<key>frame</key>
<string>{{2,2},{224,87}}</string>
<key>offset</key>
<string>{0,-25}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{2,61},{224,87}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_down_1.png</key>
<dict>
<key>frame</key>
<string>{{326,367},{152,103}}</string>
<key>offset</key>
<string>{-6,-8}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{32,36},{152,103}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_down_2.png</key>
<dict>
<key>frame</key>
<string>{{2,335},{166,105}}</string>
<key>offset</key>
<string>{-7,-3}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{24,30},{166,105}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_jump_0.png</key>
<dict>
<key>frame</key>
<string>{{326,472},{144,151}}</string>
<key>offset</key>
<string>{-10,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{32,4},{144,151}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_jump_1.png</key>
<dict>
<key>frame</key>
<string>{{170,351},{154,131}}</string>
<key>offset</key>
<string>{-13,2}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{24,12},{154,131}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_jump_2.png</key>
<dict>
<key>frame</key>
<string>{{348,260},{160,105}}</string>
<key>offset</key>
<string>{-10,4}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{24,23},{160,105}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_jump_3.png</key>
<dict>
<key>frame</key>
<string>{{2,442},{152,115}}</string>
<key>offset</key>
<string>{-12,-2}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{26,24},{152,115}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_jump_4.png</key>
<dict>
<key>frame</key>
<string>{{360,119},{148,139}}</string>
<key>offset</key>
<string>{-12,-2}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{28,12},{148,139}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_run_0.png</key>
<dict>
<key>frame</key>
<string>{{178,236},{168,113}}</string>
<key>offset</key>
<string>{-4,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{26,23},{168,113}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_run_1.png</key>
<dict>
<key>frame</key>
<string>{{182,119},{176,115}}</string>
<key>offset</key>
<string>{1,2}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{27,20},{176,115}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_run_2.png</key>
<dict>
<key>frame</key>
<string>{{228,2},{178,115}}</string>
<key>offset</key>
<string>{1,11}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{26,11},{178,115}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_run_3.png</key>
<dict>
<key>frame</key>
<string>{{2,91},{178,113}}</string>
<key>offset</key>
<string>{2,1}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{27,22},{178,113}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
<key>sheep_touch_0.png</key>
<dict>
<key>frame</key>
<string>{{2,206},{174,127}}</string>
<key>offset</key>
<string>{-5,16}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{22,0},{174,127}}</string>
<key>sourceSize</key>
<string>{228,159}</string>
</dict>
</dict>
<key>metadata</key>
<dict>
<key>format</key>
<integer>2</integer>
<key>realTextureFileName</key>
<string>sheep.png</string>
<key>size</key>
<string>{512,1024}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:a7b82875050232ffbd24deccd7e379b7:847cb78fe45f863139518baf3831526a:13084b924613a7ef2ca9c6df3339651b$</string>
<key>textureFileName</key>
<string>sheep.png</string>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,298 @@
{
"ver": "1.2.4",
"uuid": "679478cf-f911-402f-9ad6-75649317cc25",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"size": {
"width": 512,
"height": 1024
},
"type": "Texture Packer",
"subMetas": {
"sheep_down_0.png": {
"ver": "1.0.4",
"uuid": "19964863-36eb-437c-92e1-edff001c640b",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -25,
"trimX": 2,
"trimY": 2,
"width": 224,
"height": 87,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_down_1.png": {
"ver": "1.0.4",
"uuid": "d3dc5491-96af-489a-bd07-94fb66a4d390",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -6,
"offsetY": -8,
"trimX": 326,
"trimY": 367,
"width": 152,
"height": 103,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_down_2.png": {
"ver": "1.0.4",
"uuid": "36311098-60f7-4dbd-823f-d4b65bba51ac",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -7,
"offsetY": -3,
"trimX": 2,
"trimY": 335,
"width": 166,
"height": 105,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_jump_0.png": {
"ver": "1.0.4",
"uuid": "f99dcc0a-21fe-4a8b-83d4-ae2c6086f2bb",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -10,
"offsetY": 0,
"trimX": 326,
"trimY": 472,
"width": 144,
"height": 151,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_jump_1.png": {
"ver": "1.0.4",
"uuid": "b0f22f00-acd5-4281-8237-5a5537be01eb",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -13,
"offsetY": 2,
"trimX": 170,
"trimY": 351,
"width": 154,
"height": 131,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_jump_2.png": {
"ver": "1.0.4",
"uuid": "bea82e28-c68e-469e-8a2e-f960bfd6fd83",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -10,
"offsetY": 4,
"trimX": 348,
"trimY": 260,
"width": 160,
"height": 105,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_jump_3.png": {
"ver": "1.0.4",
"uuid": "13d1ac9b-9adb-4bc2-94ea-6d5cc86c4576",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -12,
"offsetY": -2,
"trimX": 2,
"trimY": 442,
"width": 152,
"height": 115,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_jump_4.png": {
"ver": "1.0.4",
"uuid": "4a35b378-ad2b-46cd-ae2a-52e34773b1e9",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -12,
"offsetY": -2,
"trimX": 360,
"trimY": 119,
"width": 148,
"height": 139,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_run_0.png": {
"ver": "1.0.4",
"uuid": "b483caae-e5fd-4067-ac76-bd2b7227af39",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -4,
"offsetY": 0,
"trimX": 178,
"trimY": 236,
"width": 168,
"height": 113,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_run_1.png": {
"ver": "1.0.4",
"uuid": "641ca71a-5ade-4f52-a845-9105b17e0d85",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 1,
"offsetY": 2,
"trimX": 182,
"trimY": 119,
"width": 176,
"height": 115,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_run_2.png": {
"ver": "1.0.4",
"uuid": "d98cc8d8-8bc1-48e1-a8c1-941df564e02c",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 1,
"offsetY": 11,
"trimX": 228,
"trimY": 2,
"width": 178,
"height": 115,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_run_3.png": {
"ver": "1.0.4",
"uuid": "237ec4a7-7729-43d5-90d2-1e5b629aad69",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 2,
"offsetY": 1,
"trimX": 2,
"trimY": 91,
"width": 178,
"height": 113,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"sheep_touch_0.png": {
"ver": "1.0.4",
"uuid": "5d309671-90b5-42bd-b193-4aee80a602d1",
"rawTextureUuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 16,
"trimX": 2,
"trimY": 206,
"width": 174,
"height": 127,
"rawWidth": 228,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

View File

@@ -0,0 +1,12 @@
{
"ver": "2.3.3",
"uuid": "a82bf3f7-5244-411c-b8dc-7b800b3bab3c",
"type": "raw",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {}
}

View File

@@ -0,0 +1,43 @@
{
"__type__": "cc.AnimationClip",
"_name": "sheep_hit",
"_objFlags": 0,
"_native": "",
"_duration": 0.5166666666666667,
"sample": 60,
"speed": 1,
"wrapMode": 1,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "5d309671-90b5-42bd-b193-4aee80a602d1"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "19964863-36eb-437c-92e1-edff001c640b"
}
},
{
"frame": 0.3333333333333333,
"value": {
"__uuid__": "d3dc5491-96af-489a-bd07-94fb66a4d390"
}
},
{
"frame": 0.5,
"value": {
"__uuid__": "36311098-60f7-4dbd-823f-d4b65bba51ac"
}
}
]
}
}
},
"events": []
}

View File

@@ -0,0 +1,5 @@
{
"ver": "2.1.0",
"uuid": "24d1963d-df84-4647-9b79-6d34ae17a827",
"subMetas": {}
}

View File

@@ -0,0 +1,25 @@
{
"__type__": "cc.AnimationClip",
"_name": "sheep_idle",
"_objFlags": 0,
"_native": "",
"_duration": 0.016666666666666666,
"sample": 60,
"speed": 1,
"wrapMode": 2,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "36311098-60f7-4dbd-823f-d4b65bba51ac"
}
}
]
}
}
},
"events": []
}

View File

@@ -0,0 +1,5 @@
{
"ver": "2.1.0",
"uuid": "1a1afca2-6657-476f-a923-411df0b0333d",
"subMetas": {}
}

View File

@@ -0,0 +1,44 @@
{
"__type__": "cc.AnimationClip",
"_name": "sheep_run",
"_objFlags": 0,
"_native": "",
"_duration": 0.4,
"sample": 10,
"speed": 1,
"wrapMode": 2,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "b483caae-e5fd-4067-ac76-bd2b7227af39"
}
},
{
"frame": 0.1,
"value": {
"__uuid__": "641ca71a-5ade-4f52-a845-9105b17e0d85"
}
},
{
"frame": 0.2,
"value": {
"__uuid__": "d98cc8d8-8bc1-48e1-a8c1-941df564e02c"
}
},
{
"frame": 0.3,
"value": {
"__uuid__": "237ec4a7-7729-43d5-90d2-1e5b629aad69"
}
}
]
}
},
"props": {}
},
"events": []
}

View File

@@ -0,0 +1,5 @@
{
"ver": "2.1.0",
"uuid": "365c3f76-afc4-4db0-ad85-ddb95fa6d4b9",
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "ffc0c320-212e-4b05-bd56-ca4301c2b20f",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"animator":"1.0.0","mainStateMachine":{"layerPos":[0,0],"layerScale":1,"anyStatePos":[-300,300],"subStates":["idle","move1","move2"],"subStateMachines":[]},"subStateMachines":[],"defaultState":"idle","anyState":{"transitions":[]},"states":[{"position":[-270,0],"upStateMachine":"BaseLayer","state":"idle","motion":"idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"move1","hasExitTime":true,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"position":[210,0],"upStateMachine":"BaseLayer","state":"move1","motion":"move1","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"move2","hasExitTime":true,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"position":[-270,-270],"upStateMachine":"BaseLayer","state":"move2","motion":"move2","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"idle","hasExitTime":true,"conditions":[{"param":"next","value":0,"logic":0}]}]}],"parameters":[{"param":"next","type":3,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "95d0a313-ebec-4f2b-8e99-38ae9ecc31ac",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"defaultState":"idle","anyState":{"transitions":[]},"states":[{"state":"idle","motion":"idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"move1","hasExitTime":true,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"state":"move1","motion":"move1","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"move2","hasExitTime":true,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"state":"move2","motion":"move2","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"idle","hasExitTime":true,"conditions":[{"param":"next","value":0,"logic":0}]}]}],"parameters":[{"param":"next","type":3,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "3b43599a-fb1d-45ae-a605-d120f985812e",
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "4cfae3f8-1706-46d3-826d-203c1b0735b7",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"animator":"1.0.0","mainStateMachine":{"layerPos":[0,0],"layerScale":1,"anyStatePos":[-300,300],"subStates":["idle","walk","aim","hit"],"subStateMachines":[]},"subStateMachines":[],"defaultState":"idle","anyState":{"transitions":[]},"states":[{"position":[-300,60],"upStateMachine":"BaseLayer","state":"idle","motion":"idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"walk","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"position":[120,60],"upStateMachine":"BaseLayer","state":"walk","motion":"walk","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"hit","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"position":[-300,-210],"upStateMachine":"BaseLayer","state":"aim","motion":"aim","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"idle","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"position":[120,-210],"upStateMachine":"BaseLayer","state":"hit","motion":"hit","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"aim","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]}],"parameters":[{"param":"next","type":3,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "701555ab-955e-4125-883e-48e627b3745f",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"defaultState":"idle","anyState":{"transitions":[]},"states":[{"state":"idle","motion":"idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"walk","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"state":"walk","motion":"walk","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"hit","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"state":"aim","motion":"aim","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"idle","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]},{"state":"hit","motion":"hit","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"aim","hasExitTime":false,"conditions":[{"param":"next","value":0,"logic":0}]}]}],"parameters":[{"param":"next","type":3,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "91924927-4ae8-4f46-b31f-53f35fd76b42",
"subMetas": {}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"imagePath":"mecha_1502b_tex.png","width":512,"SubTexture":[{"width":74,"y":93,"height":20,"name":"bullet_01_f/bullet_01","x":307},{"width":48,"y":1,"height":38,"name":"fire_effect_01_f/fireEffect","x":212},{"width":180,"y":430,"height":52,"name":"flame_01_f/ba_bu_flame1","x":1},{"frameX":-2,"frameHeight":234,"y":1,"frameY":0,"frameWidth":86,"width":81,"height":233,"name":"flame_01_f/bbb","x":1},{"width":44,"y":1,"height":39,"name":"mecha_1502b_folder/shouder_l_0","x":319},{"width":29,"y":77,"height":106,"name":"mecha_1502b_folder/foot_l_0","x":434},{"width":50,"y":185,"height":32,"name":"mecha_1502b_folder/thigh_1_l_0","x":434},{"width":122,"y":177,"height":46,"name":"mecha_1502b_folder/calf_l","x":84},{"width":101,"y":118,"height":57,"name":"mecha_1502b_folder/thigh_l","x":84},{"width":41,"y":77,"height":65,"name":"mecha_1502b_folder/pelvis","x":465},{"width":89,"y":236,"height":192,"name":"mecha_1502b_folder/chest","x":1},{"width":29,"y":77,"height":109,"name":"mecha_1502b_folder/foot_r","x":403},{"width":55,"y":1,"height":32,"name":"mecha_1502b_folder/thigh_1_r_1","x":262},{"width":126,"y":1,"height":52,"name":"mecha_1502b_folder/calf_r","x":84},{"width":103,"y":55,"height":61,"name":"mecha_1502b_folder/thigh_r","x":84},{"width":43,"y":144,"height":39,"name":"mecha_1502b_folder/shouder_r_1","x":465},{"width":116,"y":55,"height":44,"name":"weapon_1502b_folder/back_l","x":189},{"frameX":0,"frameHeight":36,"y":39,"frameY":0,"frameWidth":94,"width":93,"height":36,"name":"weapon_1502b_folder/image/paoguan_0002","x":403},{"width":94,"y":1,"height":36,"name":"weapon_1502b_folder/image/paoguan_0001","x":403},{"width":94,"y":55,"height":36,"name":"weapon_1502b_folder/image/paoguan_0003","x":307},{"width":121,"y":118,"height":45,"name":"weapon_1502b_folder/back_r","x":187}],"height":512,"name":"mecha_1502b"}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "2793a939-cf7f-4a69-bc16-d2ed790b67d5",
"atlasJson": "{\"imagePath\":\"mecha_1502b_tex.png\",\"width\":512,\"SubTexture\":[{\"width\":74,\"y\":93,\"height\":20,\"name\":\"bullet_01_f/bullet_01\",\"x\":307},{\"width\":48,\"y\":1,\"height\":38,\"name\":\"fire_effect_01_f/fireEffect\",\"x\":212},{\"width\":180,\"y\":430,\"height\":52,\"name\":\"flame_01_f/ba_bu_flame1\",\"x\":1},{\"frameX\":-2,\"frameHeight\":234,\"y\":1,\"frameY\":0,\"frameWidth\":86,\"width\":81,\"height\":233,\"name\":\"flame_01_f/bbb\",\"x\":1},{\"width\":44,\"y\":1,\"height\":39,\"name\":\"mecha_1502b_folder/shouder_l_0\",\"x\":319},{\"width\":29,\"y\":77,\"height\":106,\"name\":\"mecha_1502b_folder/foot_l_0\",\"x\":434},{\"width\":50,\"y\":185,\"height\":32,\"name\":\"mecha_1502b_folder/thigh_1_l_0\",\"x\":434},{\"width\":122,\"y\":177,\"height\":46,\"name\":\"mecha_1502b_folder/calf_l\",\"x\":84},{\"width\":101,\"y\":118,\"height\":57,\"name\":\"mecha_1502b_folder/thigh_l\",\"x\":84},{\"width\":41,\"y\":77,\"height\":65,\"name\":\"mecha_1502b_folder/pelvis\",\"x\":465},{\"width\":89,\"y\":236,\"height\":192,\"name\":\"mecha_1502b_folder/chest\",\"x\":1},{\"width\":29,\"y\":77,\"height\":109,\"name\":\"mecha_1502b_folder/foot_r\",\"x\":403},{\"width\":55,\"y\":1,\"height\":32,\"name\":\"mecha_1502b_folder/thigh_1_r_1\",\"x\":262},{\"width\":126,\"y\":1,\"height\":52,\"name\":\"mecha_1502b_folder/calf_r\",\"x\":84},{\"width\":103,\"y\":55,\"height\":61,\"name\":\"mecha_1502b_folder/thigh_r\",\"x\":84},{\"width\":43,\"y\":144,\"height\":39,\"name\":\"mecha_1502b_folder/shouder_r_1\",\"x\":465},{\"width\":116,\"y\":55,\"height\":44,\"name\":\"weapon_1502b_folder/back_l\",\"x\":189},{\"frameX\":0,\"frameHeight\":36,\"y\":39,\"frameY\":0,\"frameWidth\":94,\"width\":93,\"height\":36,\"name\":\"weapon_1502b_folder/image/paoguan_0002\",\"x\":403},{\"width\":94,\"y\":1,\"height\":36,\"name\":\"weapon_1502b_folder/image/paoguan_0001\",\"x\":403},{\"width\":94,\"y\":55,\"height\":36,\"name\":\"weapon_1502b_folder/image/paoguan_0003\",\"x\":307},{\"width\":121,\"y\":118,\"height\":45,\"name\":\"weapon_1502b_folder/back_r\",\"x\":187}],\"height\":512,\"name\":\"mecha_1502b\"}",
"texture": "f9d4e201-c14a-4876-bd8b-e1233a3f5fd8",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

View File

@@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "f9d4e201-c14a-4876-bd8b-e1233a3f5fd8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"mecha_1502b_tex": {
"ver": "1.0.4",
"uuid": "3e01bc7c-f1ec-4149-ab81-644d53e7e85b",
"rawTextureUuid": "f9d4e201-c14a-4876-bd8b-e1233a3f5fd8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1.5,
"offsetY": 14.5,
"trimX": 1,
"trimY": 1,
"width": 507,
"height": 481,
"rawWidth": 512,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "b4fb9513-fb6d-4bb2-8b12-be957a6ad7cd",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"animator":"1.0.0","mainStateMachine":{"layerPos":[-39.57449196272348,57.1601385080676],"layerScale":1.4000000000000004,"anyStatePos":[-300,300],"subStates":["idle","walk","run","jump"],"subStateMachines":[]},"subStateMachines":[],"defaultState":"idle","anyState":{"transitions":[]},"states":[{"position":[-270,60],"upStateMachine":"BaseLayer","state":"idle","motion":"idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"walk","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":2},{"param":"speed","value":2,"logic":3}]},{"toState":"run","hasExitTime":false,"conditions":[{"param":"speed","value":2,"logic":4}]},{"toState":"jump","hasExitTime":false,"conditions":[{"param":"jump","value":0,"logic":0}]}]},{"position":[210,60],"upStateMachine":"BaseLayer","state":"walk","motion":"walk","speed":1,"multiplier":"speed","loop":true,"transitions":[{"toState":"idle","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":0}]},{"toState":"run","hasExitTime":false,"conditions":[{"param":"speed","value":2,"logic":4}]},{"toState":"jump","hasExitTime":false,"conditions":[{"param":"jump","value":0,"logic":0}]}]},{"position":[-270,-150],"upStateMachine":"BaseLayer","state":"run","motion":"run","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"idle","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":0}]},{"toState":"walk","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":2},{"param":"speed","value":2,"logic":3}]},{"toState":"jump","hasExitTime":false,"conditions":[{"param":"jump","value":0,"logic":0}]}]},{"position":[210,-270],"upStateMachine":"BaseLayer","state":"jump","motion":"jump","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"idle","hasExitTime":true,"conditions":[]}]}],"parameters":[{"param":"speed","type":2,"init":0},{"param":"jump","type":4,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "acf936e0-be76-4a88-8fa5-98391c31cbc1",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"animator":"1.0.0","mainStateMachine":{"layerPos":[0,0],"layerScale":1,"anyStatePos":[-300,300],"subStates":["empty","shoot"],"subStateMachines":[]},"subStateMachines":[],"defaultState":"empty","anyState":{"transitions":[]},"states":[{"position":[-300,-60],"upStateMachine":"BaseLayer","state":"empty","motion":"","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"shoot","hasExitTime":false,"conditions":[{"param":"shoot","value":0,"logic":0}]}]},{"position":[150,-60],"upStateMachine":"BaseLayer","state":"shoot","motion":"shoot","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"empty","hasExitTime":true,"conditions":[]}]}],"parameters":[{"param":"shoot","type":4,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "b9fbc4bb-a022-4927-8824-edf4bd30b556",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"defaultState":"idle","anyState":{"transitions":[]},"states":[{"state":"idle","motion":"idle","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"walk","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":2},{"param":"speed","value":2,"logic":3}]},{"toState":"run","hasExitTime":false,"conditions":[{"param":"speed","value":2,"logic":4}]},{"toState":"jump","hasExitTime":false,"conditions":[{"param":"jump","value":0,"logic":0}]}]},{"state":"walk","motion":"walk","speed":1,"multiplier":"speed","loop":true,"transitions":[{"toState":"idle","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":0}]},{"toState":"run","hasExitTime":false,"conditions":[{"param":"speed","value":2,"logic":4}]},{"toState":"jump","hasExitTime":false,"conditions":[{"param":"jump","value":0,"logic":0}]}]},{"state":"run","motion":"run","speed":1,"multiplier":"","loop":true,"transitions":[{"toState":"idle","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":0}]},{"toState":"walk","hasExitTime":false,"conditions":[{"param":"speed","value":0,"logic":2},{"param":"speed","value":2,"logic":3}]},{"toState":"jump","hasExitTime":false,"conditions":[{"param":"jump","value":0,"logic":0}]}]},{"state":"jump","motion":"jump","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"idle","hasExitTime":true,"conditions":[]}]}],"parameters":[{"param":"speed","type":2,"init":0},{"param":"jump","type":4,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "a4c4a817-2577-4c9b-94dc-bc6fe12a8ce8",
"subMetas": {}
}

View File

@@ -0,0 +1 @@
{"defaultState":"empty","anyState":{"transitions":[]},"states":[{"state":"empty","motion":"","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"shoot","hasExitTime":false,"conditions":[{"param":"shoot","value":0,"logic":0}]}]},{"state":"shoot","motion":"shoot","speed":1,"multiplier":"","loop":false,"transitions":[{"toState":"empty","hasExitTime":true,"conditions":[]}]}],"parameters":[{"param":"shoot","type":4,"init":0}]}

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.0",
"uuid": "b58f7a9d-68b5-440f-896f-ef2d0359382d",
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.2",
"uuid": "a5e3714e-7870-4b3a-acf6-1e78ec8b90df",
"textures": [
"1fca40dd-d252-4f6e-9a11-904e370eab6b"
],
"scale": 1,
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

View File

@@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "1fca40dd-d252-4f6e-9a11-904e370eab6b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"spineboy": {
"ver": "1.0.4",
"uuid": "0a9b7c82-adbe-47bb-b9ea-9ef63db25f91",
"rawTextureUuid": "1fca40dd-d252-4f6e-9a11-904e370eab6b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -11,
"offsetY": 6,
"trimX": 2,
"trimY": 2,
"width": 998,
"height": 240,
"rawWidth": 1024,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@@ -0,0 +1,195 @@
spineboy.png
size:1024,256
format: RGBA8888
filter: Linear,Linear
repeat: none
eye_indifferent
rotate: true
xy: 389, 5
size: 56, 53
orig: 56, 53
offset: 0, 0
index: -1
eye_surprised
rotate: false
xy: 580, 34
size: 56, 53
orig: 56, 53
offset: 0, 0
index: -1
front_bracer
rotate: false
xy: 732, 85
size: 35, 48
orig: 35, 48
offset: 0, 0
index: -1
front_fist_closed
rotate: false
xy: 556, 91
size: 45, 49
orig: 45, 49
offset: 0, 0
index: -1
front_fist_open
rotate: false
xy: 668, 32
size: 52, 52
orig: 52, 52
offset: 0, 0
index: -1
front_foot
rotate: false
xy: 924, 201
size: 76, 41
orig: 76, 41
offset: 0, 0
index: -1
front_foot_bend1
rotate: false
xy: 845, 200
size: 77, 42
orig: 77, 42
offset: 0, 0
index: -1
front_foot_bend2
rotate: false
xy: 778, 186
size: 65, 56
orig: 65, 56
offset: 0, 0
index: -1
front_shin
rotate: true
xy: 444, 91
size: 49, 110
orig: 49, 110
offset: 0, 0
index: -1
front_thigh
rotate: true
xy: 603, 89
size: 29, 67
orig: 29, 67
offset: 0, 0
index: -1
front_upper_arm
rotate: true
xy: 672, 86
size: 32, 58
orig: 32, 58
offset: 0, 0
index: -1
goggles
rotate: false
xy: 444, 142
size: 157, 100
orig: 157, 100
offset: 0, 0
index: -1
gun
rotate: false
xy: 603, 120
size: 126, 122
orig: 126, 122
offset: 0, 0
index: -1
head
rotate: false
xy: 279, 63
size: 163, 179
orig: 163, 179
offset: 0, 0
index: -1
mouth_grind
rotate: false
xy: 845, 163
size: 56, 35
orig: 56, 35
offset: 0, 0
index: -1
mouth_oooo
rotate: false
xy: 842, 126
size: 56, 35
orig: 56, 35
offset: 0, 0
index: -1
mouth_smile
rotate: false
xy: 769, 97
size: 56, 35
orig: 56, 35
offset: 0, 0
index: -1
muzzle
rotate: false
xy: 2, 2
size: 275, 240
orig: 277, 240
offset: 0, 0
index: -1
neck
rotate: false
xy: 903, 173
size: 22, 25
orig: 22, 25
offset: 0, 0
index: -1
rear_bracer
rotate: false
xy: 722, 40
size: 34, 43
orig: 34, 43
offset: 0, 0
index: -1
rear_foot
rotate: false
xy: 444, 11
size: 68, 36
orig: 68, 36
offset: 0, 0
index: -1
rear_foot_bend1
rotate: false
xy: 444, 49
size: 70, 40
orig: 70, 40
offset: 0, 0
index: -1
rear_foot_bend2
rotate: false
xy: 778, 134
size: 62, 50
orig: 62, 50
offset: 0, 0
index: -1
rear_shin
rotate: false
xy: 731, 135
size: 45, 107
orig: 45, 107
offset: 0, 0
index: -1
rear_thigh
rotate: true
xy: 516, 50
size: 39, 62
orig: 39, 62
offset: 0, 0
index: -1
rear_upper_arm
rotate: false
xy: 638, 35
size: 28, 52
orig: 28, 52
offset: 0, 0
index: -1
torso
rotate: true
xy: 279, 2
size: 59, 108
orig: 59, 108
offset: 0, 0
index: -1

View File

@@ -0,0 +1,5 @@
{
"ver": "2.0.0",
"uuid": "24a83a5f-48eb-40c4-ad22-95385682e0e3",
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "8316e976-8f63-47fd-a5b5-dc10fc684312",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,595 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "43925b6c-075e-4466-a3fe-582378320bbe"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
960,
540,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2fnzhYDDhH+o7heymIpQap"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
337.9122923544306,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "43gdsY9DVP862c3LIKCc7W"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "e6yEYF90pEMLeXgxk4Hbv7"
},
{
"__type__": "cc.Node",
"_name": "info",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 803.59,
"height": 144.64
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-420.862,
361.941,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eZbpCz5pET7+Ec/nts+Ya"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "按左右键移动\n按k键播放hit动画并打断移动",
"_N$string": "按左右键移动\n按k键播放hit动画并打断移动",
"_fontSize": 64,
"_lineHeight": 64,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "35W5Duu3dAdauEtS3SXEYi"
},
{
"__type__": "cc.Node",
"_name": "ground",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 46,
"g": 82,
"b": 66,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-54,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d87kkEe1lKWbWHA8Dfo51E"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "78u7U+C3dGX4ApD1E5oUnD"
},
{
"__type__": "cc.Node",
"_name": "Sheep",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 166,
"height": 105
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3dMop0lcpB5ap16Dr3NLeE"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "36311098-60f7-4dbd-823f-d4b65bba51ac"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "679478cf-f911-402f-9ad6-75649317cc25"
},
"_id": "52DYKxWtBARbHB0VzsEalX"
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_defaultClip": null,
"_clips": [
{
"__uuid__": "24d1963d-df84-4647-9b79-6d34ae17a827"
},
{
"__uuid__": "1a1afca2-6657-476f-a923-411df0b0333d"
},
{
"__uuid__": "365c3f76-afc4-4db0-ad85-ddb95fa6d4b9"
}
],
"playOnLoad": false,
"_id": "bcKYZj9ulE2ZcRFn31cVCb"
},
{
"__type__": "c0eccTRS2tFf5D/vabVUToc",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"AssetRawUrl": {
"__uuid__": "eafb4a36-50c1-4417-b90a-234e6a57e0ba"
},
"PlayOnStart": false,
"AutoUpdate": false,
"_id": "90GlQw+UVPg6vmrtIrndbK"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "b0j7FPe5BMD7397xVWjcMb"
},
{
"__type__": "14db7VUlFRDOKSHFQUjRZrK",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"Animator": {
"__id__": 12
},
"_id": "96DtkQX15IyIGmoidkuOSP"
}
]

View File

@@ -0,0 +1,7 @@
{
"ver": "1.2.5",
"uuid": "43925b6c-075e-4466-a3fe-582378320bbe",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -0,0 +1,470 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "a01bf096-4001-4a1b-b287-3be7f71862ad"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 11
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
960,
540,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d0tqW3ByxFQblWu45a5GMA"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
337.9122923544306,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f6PBTeImtJBrZZicL5UNin"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "784UbtpBhE8YVW8qhcwfo0"
},
{
"__type__": "cc.Node",
"_name": "Cube",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 70,
"g": 76,
"b": 211,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5cOhQEACpJgLkRzD51Zo6f"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "eespuLqxNGRpNueW2q1ld2"
},
{
"__type__": "0e26fCq18dIn7sZ8VOtyCEI",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"AssetRawUrl": {
"__uuid__": "3b43599a-fb1d-45ae-a605-d120f985812e"
},
"PlayOnStart": false,
"AutoUpdate": true,
"_id": "830b6JiVVO1a5RD1IPhTi/"
},
{
"__type__": "cc.Node",
"_name": "info",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 704,
"height": 80.64
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
370,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a2NKS5XO1NLY25vI/h3MUm"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "点击屏幕切换下一个动画",
"_N$string": "点击屏幕切换下一个动画",
"_fontSize": 64,
"_lineHeight": 64,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "33HOdXuw5GCZEeeYon3hwb"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "7eneme19dEhLmAPLWqwLPL"
},
{
"__type__": "4ecb8kn8zpIM5/7jjjBGTaH",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"Cube": {
"__id__": 5
},
"_id": "b6SV1vk9xEn7LSuSSI2+OU"
}
]

View File

@@ -0,0 +1,7 @@
{
"ver": "1.2.5",
"uuid": "a01bf096-4001-4a1b-b287-3be7f71862ad",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -0,0 +1,478 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "cbce07d4-8ebb-45af-ba6a-92f10c90e44f"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 11
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
960,
540,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5c+lnLk7hCQZukqeDKipf+"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
337.7446708008789,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d7b9QRh1BKx5jCW9RrYHW0"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "37RyO+zC5GTZLa2IsKhgNL"
},
{
"__type__": "cc.Node",
"_name": "mecha_1502b_ske",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "eeAw6eZqlNwZTeXKWdTh+P"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "mecha_1502b",
"_animationName": "aim",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "26b72df2-3334-455b-964e-db6847774e64#2793a939-cf7f-4a69-bc16-d2ed790b67d5",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "26b72df2-3334-455b-964e-db6847774e64"
},
"_N$dragonAtlasAsset": {
"__uuid__": "2793a939-cf7f-4a69-bc16-d2ed790b67d5"
},
"_N$_defaultArmatureIndex": 3,
"_N$_animationIndex": 15,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "8cFD32P/NCD5mKdL318w+z"
},
{
"__type__": "fa0001DMAlCzZ/hkmySCXhc",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"AssetRawUrl": {
"__uuid__": "91924927-4ae8-4f46-b31f-53f35fd76b42"
},
"PlayOnLoad": true,
"AutoUpdate": true,
"_id": "f5wzpMVrdIf4wgL6YT0+2k"
},
{
"__type__": "cc.Node",
"_name": "info",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 512,
"height": 80.64
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
300,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5bZkQ6BzBCHo9L9EDDs74A"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "点击屏幕切换动画",
"_N$string": "点击屏幕切换动画",
"_fontSize": 64,
"_lineHeight": 64,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "c1stylrVVKr5f5NPTO84fM"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "06kiZkyIJLQartAZWv1j7+"
},
{
"__type__": "46c5f3rR99BdL/g8jPFTaRb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"Animator": {
"__id__": 7
},
"_id": "dfU81p/IlBBo2G+QzZ1cZX"
}
]

View File

@@ -0,0 +1,7 @@
{
"ver": "1.2.5",
"uuid": "cbce07d4-8ebb-45af-ba6a-92f10c90e44f",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -0,0 +1,499 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "e2a4478a-d1d7-4049-b006-7be03ae32f62"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
960,
540,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d5PbdupI9MzIYanN2n/w4y"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
337.7446577905061,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "65BAnD7nZMmJKEjmCkaJQs"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "09SCmtIJRIzZZ0xtzRd0bY"
},
{
"__type__": "cc.Node",
"_name": "info",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1287.16,
"height": 272.64
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-253.473,
359.87,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cbTvNdZQVNJZX19d6T2q5U"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "按以下按键播放动画\n左右方向键(按住加速,松开减速)walk、run\n空格键jump\nkshoot",
"_N$string": "按以下按键播放动画\n左右方向键(按住加速,松开减速)walk、run\n空格键jump\nkshoot",
"_fontSize": 64,
"_lineHeight": 64,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "82cLjGOzJIEa8lq21IafRj"
},
{
"__type__": "cc.Node",
"_name": "spineboy",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 9
},
{
"__id__": 10
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-360,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e8lexkq8dMNab6Z9MEI/ky"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
}
],
"paused": false,
"defaultSkin": "",
"defaultAnimation": "",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "a5e3714e-7870-4b3a-acf6-1e78ec8b90df"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,
"_N$debugBones": false,
"_N$debugMesh": false,
"_N$useTint": false,
"_N$enableBatch": false,
"_id": "c1Za9Hx3BKeo0Xf6wRH0tz"
},
{
"__type__": "81397AkbwFD5Izg7F0yY1/D",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"AssetRawUrl": {
"__uuid__": "a4c4a817-2577-4c9b-94dc-bc6fe12a8ce8"
},
"PlayOnStart": false,
"AutoUpdate": true,
"_id": "b60UaHdkdFbZ6yfl+H0Phm"
},
{
"__type__": "32504xevahNAblXzax6Zdkv",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"AssetRawUrl": {
"__uuid__": "b58f7a9d-68b5-440f-896f-ef2d0359382d"
},
"PlayOnStart": true,
"AutoUpdate": true,
"TrackIndex": 1,
"_id": "47ianh+1pHcbo7nNb/aYiV"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "d3fJPGqCZNr5EcI+Cccf+/"
},
{
"__type__": "1810cN/HlpB7LK654rJsVXg",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"SpineBoy": {
"__id__": 8
},
"_id": "c6mUGXnhFO9LwZvNL2dzK9"
}
]

View File

@@ -0,0 +1,7 @@
{
"ver": "1.2.5",
"uuid": "e2a4478a-d1d7-4049-b006-7be03ae32f62",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "fa7b3b8d-41ad-455f-b2c0-c542fc3b9d6c",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "1d876d7a-3ee1-4416-a86b-478e7a2291bc",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,90 @@
import AnimatorBase, { AnimationPlayer } from "./core/AnimatorBase";
import AnimatorStateLogic from "./core/AnimatorStateLogic";
const { ccclass, property, requireComponent, disallowMultiple } = cc._decorator;
/**
* Cocos Animation状态机组件
*/
@ccclass
@disallowMultiple
@requireComponent(cc.Animation)
export default class AnimatorAnimation extends AnimatorBase {
/** Animation组件 */
private _animation: cc.Animation = null;
/** 当前的动画实例 */
private _animState: cc.AnimationState = null;
/** 记录初始的wrapmode */
private _wrapModeMap: Map<cc.AnimationState, cc.WrapMode> = new Map();
protected start() {
if (!this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this._animation = this.getComponent(cc.Animation);
this._animation.on(cc.Animation.EventType.FINISHED, this.onAnimFinished, this);
this._animation.on(cc.Animation.EventType.LASTFRAME, this.onAnimFinished, this);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 手动初始化状态机可传入0-3个参数类型如下
* - onStateChangeCall 状态切换时的回调
* - stateLogicMap 各个状态逻辑控制
* - animationPlayer 自定义动画控制
* @override
*/
public onInit(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
if (this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this.initArgs(...args);
this._animation = this.getComponent(cc.Animation);
this._animation.on(cc.Animation.EventType.FINISHED, this.onAnimFinished, this);
this._animation.on(cc.Animation.EventType.LASTFRAME, this.onAnimFinished, this);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 播放动画
* @override
* @param animName 动画名
* @param loop 是否循环播放
*/
protected playAnimation(animName: string, loop: boolean) {
if (!animName) {
return;
}
this._animState = this._animation.play(animName);
if (!this._animState) {
return;
}
if (!this._wrapModeMap.has(this._animState)) {
this._wrapModeMap.set(this._animState, this._animState.wrapMode);
}
this._animState.wrapMode = loop ? cc.WrapMode.Loop : this._wrapModeMap.get(this._animState);
}
/**
* 缩放动画播放速率
* @override
* @param scale 缩放倍率
*/
protected scaleTime(scale: number) {
if (this._animState) {
this._animState.speed = scale;
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "c0ecc4d1-4b6b-457f-90ff-bda6d5513a1c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,58 @@
import AnimatorBase, { AnimationPlayer } from "./core/AnimatorBase";
import AnimatorStateLogic from "./core/AnimatorStateLogic";
const { ccclass, property, requireComponent, disallowMultiple } = cc._decorator;
/**
* 自定义动画控制的状态机组件
*/
@ccclass
@disallowMultiple
export default class AnimatorCustomization extends AnimatorBase {
/** 此组件必须主动调用onInit初始化 */
@property({ override: true, visible: false })
protected PlayOnStart: boolean = false;
/**
* 手动初始化状态机可传入0-3个参数类型如下
* - onStateChangeCall 状态切换时的回调
* - stateLogicMap 各个状态逻辑控制
* - animationPlayer 自定义动画控制
* @override
*/
public onInit(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
if (this._hasInit) {
return;
}
this._hasInit = true;
this.initArgs(...args);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 播放动画
* @override
* @param animName 动画名
* @param loop 是否循环播放
*/
protected playAnimation(animName: string, loop: boolean) {
if (this._animationPlayer && animName) {
this._animationPlayer.playAnimation(animName, loop);
}
}
/**
* 缩放动画播放速率
* @override
* @param scale 缩放倍率
*/
protected scaleTime(scale: number) {
if (this._animationPlayer) {
this._animationPlayer.scaleTime(scale);
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "0e26f0aa-d7c7-489f-bb19-f153adc82108",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,71 @@
import AnimatorBase, { AnimationPlayer } from "./core/AnimatorBase";
import AnimatorStateLogic from "./core/AnimatorStateLogic";
const { ccclass, property, requireComponent, disallowMultiple } = cc._decorator;
/**
* DragonBones状态机组件
*/
@ccclass
@disallowMultiple
@requireComponent(dragonBones.ArmatureDisplay)
export default class AnimatorDragonBones extends AnimatorBase {
/** DragonBones组件 */
private _dragonBones: dragonBones.ArmatureDisplay = null;
protected start() {
if (!this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this._dragonBones = this.getComponent(dragonBones.ArmatureDisplay);
this._dragonBones.addEventListener(dragonBones.EventObject.COMPLETE, this.onAnimFinished, this);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 手动初始化状态机可传入0-3个参数类型如下
* - onStateChangeCall 状态切换时的回调
* - stateLogicMap 各个状态逻辑控制
* - animationPlayer 自定义动画控制
* @override
*/
public onInit(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
if (this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this.initArgs(...args);
this._dragonBones = this.getComponent(dragonBones.ArmatureDisplay);
this._dragonBones.addEventListener(dragonBones.EventObject.COMPLETE, this.onAnimFinished, this);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 播放动画
* @override
* @param animName 动画名
* @param loop 是否循环播放
*/
protected playAnimation(animName: string, loop: boolean) {
animName && this._dragonBones.playAnimation(animName, loop ? 0 : -1);
}
/**
* 缩放动画播放速率
* @override
* @param scale 缩放倍率
*/
protected scaleTime(scale: number) {
this._dragonBones.timeScale = scale;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "fa000d43-3009-42cd-9fe1-926c9209785c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,120 @@
import AnimatorSpineSecondary from "./AnimatorSpineSecondary";
import AnimatorBase, { AnimationPlayer } from "./core/AnimatorBase";
import AnimatorStateLogic from "./core/AnimatorStateLogic";
const { ccclass, property, requireComponent, disallowMultiple } = cc._decorator;
/**
* Spine状态机组件主状态机trackIndex为0
*/
@ccclass
@disallowMultiple
@requireComponent(sp.Skeleton)
export default class AnimatorSpine extends AnimatorBase {
/** spine组件 */
private _spine: sp.Skeleton = null;
/** 动画完成的回调 */
private _completeListenerMap: Map<(entry?: any) => void, any> = new Map();
/** 次状态机注册的回调 */
private _secondaryListenerMap: Map<(entry?: any) => void, AnimatorSpineSecondary> = new Map();
protected start() {
if (!this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this._spine = this.getComponent(sp.Skeleton);
this._spine.setCompleteListener(this.onSpineComplete.bind(this));
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 手动初始化状态机可传入0-3个参数类型如下
* - onStateChangeCall 状态切换时的回调
* - stateLogicMap 各个状态逻辑控制
* - animationPlayer 自定义动画控制
* @override
*/
public onInit(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
if (this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this.initArgs(...args);
this._spine = this.getComponent(sp.Skeleton);
this._spine.setCompleteListener(this.onSpineComplete.bind(this));
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
private onSpineComplete(entry: any) {
entry.trackIndex === 0 && this.onAnimFinished();
this._completeListenerMap.forEach((target, cb) => { target ? cb.call(target, entry) : cb(entry); });
this._secondaryListenerMap.forEach((target, cb) => { entry.trackIndex === target.TrackIndex && cb.call(target, entry); });
}
/**
* 播放动画
* @override
* @param animName 动画名
* @param loop 是否循环播放
*/
protected playAnimation(animName: string, loop: boolean) {
if (animName) {
this._spine.setAnimation(0, animName, loop);
} else {
this._spine.clearTrack(0);
}
}
/**
* 缩放动画播放速率
* @override
* @param scale 缩放倍率
*/
protected scaleTime(scale: number) {
this._spine.timeScale = scale;
}
/**
* 注册次状态机动画结束的回调(状态机内部方法,不能由外部直接调用)
*/
public addSecondaryListener(cb: (entry?: any) => void, target: AnimatorSpineSecondary) {
this._secondaryListenerMap.set(cb, target);
}
/**
* 注册动画完成时的监听
* @param cb 回调
* @param target 调用回调的this对象
*/
public addCompleteListener(cb: (entry?: any) => void, target: any = null) {
if (this._completeListenerMap.has(cb)) {
return;
}
this._completeListenerMap.set(cb, target);
}
/**
* 注销动画完成的监听
* @param cb 回调
*/
public removeCompleteListener(cb: (entry?: any) => void) {
this._completeListenerMap.delete(cb);
}
/**
* 清空动画完成的监听
*/
public clearCompleteListener() {
this._completeListenerMap.clear;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "81397024-6f01-43e4-8ce0-ec5d32635fc3",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,72 @@
import AnimatorSpine from "./AnimatorSpine";
import AnimatorBase, { AnimationPlayer } from "./core/AnimatorBase";
import AnimatorStateLogic from "./core/AnimatorStateLogic";
const { ccclass, property, requireComponent } = cc._decorator;
/**
* Spine状态机组件次状态机同一节点可添加多个用于在不同track中播放动画trackIndex必须大于0
*/
@ccclass
@requireComponent(sp.Skeleton)
export default class AnimatorSpineSecondary extends AnimatorBase {
@property({ tooltip: CC_DEV && '动画播放的trackIndex必须大于0' }) TrackIndex: number = 1;
/** 主状态机 */
private _main: AnimatorSpine = null;
/** spine组件 */
private _spine: sp.Skeleton = null;
protected start() {
if (!this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this._spine = this.getComponent(sp.Skeleton);
this._main = this.getComponent(AnimatorSpine);
this._main.addSecondaryListener(this.onAnimFinished, this);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 手动初始化状态机可传入0-3个参数类型如下
* - onStateChangeCall 状态切换时的回调
* - stateLogicMap 各个状态逻辑控制
* - animationPlayer 自定义动画控制
* @override
*/
public onInit(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
if (this.PlayOnStart || this._hasInit) {
return;
}
this._hasInit = true;
this.initArgs(...args);
this._spine = this.getComponent(sp.Skeleton);
this._main = this.getComponent(AnimatorSpine);
this._main.addSecondaryListener(this.onAnimFinished, this);
if (this.AssetRawUrl !== null) {
this.initJson(this.AssetRawUrl.json);
}
}
/**
* 播放动画
* @override
* @param animName 动画名
* @param loop 是否循环播放
*/
protected playAnimation(animName: string, loop: boolean) {
if (animName) {
this._spine.setAnimation(this.TrackIndex, animName, loop);
} else {
this._spine.clearTrack(this.TrackIndex);
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "32504c5e-bda8-4d01-b957-cdac7a65d92f",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "686e46ec-3c93-40c8-a343-98d92f38c904",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,227 @@
import AnimatorController from "./AnimatorController";
import AnimatorState from "./AnimatorState";
import AnimatorStateLogic from "./AnimatorStateLogic";
const { ccclass, property, executionOrder } = cc._decorator;
/**
* 自定义控制动画播放的接口
*/
export interface AnimationPlayer {
/** 设置动画播放结束的回调 */
setFinishedCallback(callback: () => void, target: any): void;
/** 播放动画 */
playAnimation(animName: string, loop: boolean): void;
/** 缩放动画播放速率 */
scaleTime(scale: number): void;
}
/**
* 状态机组件基类 优先执行生命周期
*/
@ccclass
@executionOrder(-1000)
export default class AnimatorBase extends cc.Component {
@property({ type: cc.JsonAsset, tooltip: CC_DEV && '状态机json文件' })
protected AssetRawUrl: cc.JsonAsset = null;
@property({ tooltip: CC_DEV && '是否在start中自动启动状态机' })
protected PlayOnStart: boolean = true;
@property({ tooltip: CC_DEV && '是否在update中自动触发状态机逻辑更新' })
protected AutoUpdate: boolean = true;
/** 是否初始化 */
protected _hasInit: boolean = false;
/** 状态机控制 */
protected _ac: AnimatorController = null;
/** 各个状态逻辑控制key为状态名 */
protected _stateLogicMap: Map<string, AnimatorStateLogic> = null;
/** 状态切换时的回调 */
protected _onStateChangeCall: (fromState: string, toState: string) => void = null;
/** 自定义的动画播放控制器 */
protected _animationPlayer: AnimationPlayer = null;
/** 当前状态名 */
public get curStateName(): string {
return this._ac.curState.name;
}
/** 当前动画名 */
public get curStateMotion(): string {
return this._ac.curState.motion;
}
/**
* 手动初始化状态机可传入0-3个参数类型如下
* - onStateChangeCall 状态切换时的回调
* - stateLogicMap 各个状态逻辑控制
* - animationPlayer 自定义动画控制
* @virtual
*/
public onInit(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
}
/**
* 处理初始化参数
*/
protected initArgs(...args: Array<Map<string, AnimatorStateLogic> | ((fromState: string, toState: string) => void) | AnimationPlayer>) {
args.forEach((arg) => {
if (!arg) {
return;
}
if (typeof arg === 'function') {
this._onStateChangeCall = arg;
} else if (typeof arg === 'object') {
if (arg instanceof Map) {
this._stateLogicMap = arg;
} else {
this._animationPlayer = arg;
this._animationPlayer.setFinishedCallback(this.onAnimFinished, this);
}
}
});
}
private updateAnimator() {
// 混合当前动画播放速度
let playSpeed = this._ac.curState.speed;
if (this._ac.curState.multi) {
playSpeed *= this._ac.params.getNumber(this._ac.curState.multi) || 1;
}
this.scaleTime(playSpeed);
// 更新AnimatorStateLogic
if (this._stateLogicMap) {
let curLogic = this._stateLogicMap.get(this._ac.curState.name);
curLogic && curLogic.onUpdate();
}
// 更新状态机逻辑
this._ac.updateAnimator();
}
protected update() {
if (this._hasInit && this.AutoUpdate) {
this.updateAnimator();
}
}
/**
* 手动调用更新
*/
public manualUpdate() {
if (this._hasInit && !this.AutoUpdate) {
this.updateAnimator();
}
}
/**
* 解析状态机json文件
*/
protected initJson(json: any) {
this._ac = new AnimatorController(this, json);
}
/**
* 动画结束的回调
*/
protected onAnimFinished() {
this._ac.onAnimationComplete();
}
/**
* 播放动画
* @virtual
* @param animName 动画名
* @param loop 是否循环播放
*/
protected playAnimation(animName: string, loop: boolean) {
}
/**
* 缩放动画播放速率
* @virtual
* @param scale 缩放倍率
*/
protected scaleTime(scale: number) {
}
/**
* 状态切换时的逻辑(状态机内部方法,不能由外部直接调用)
*/
public onStateChange(fromState: AnimatorState, toState: AnimatorState) {
this.playAnimation(toState.motion, toState.loop);
let fromStateName = fromState ? fromState.name : '';
if (this._stateLogicMap) {
let fromLogic = this._stateLogicMap.get(fromStateName);
fromLogic && fromLogic.onExit();
let toLogic = this._stateLogicMap.get(toState.name);
toLogic && toLogic.onEntry();
}
this._onStateChangeCall && this._onStateChangeCall(fromStateName, toState.name);
}
/**
* 设置boolean类型参数的值
*/
public setBool(key: string, value: boolean) {
this._ac.params.setBool(key, value);
}
/**
* 获取boolean类型参数的值
*/
public getBool(key: string): boolean {
return this._ac.params.getBool(key) !== 0;
}
/**
* 设置number类型参数的值
*/
public setNumber(key: string, value: number) {
this._ac.params.setNumber(key, value);
}
/**
* 获取number类型参数的值
*/
public getNumber(key: string): number {
return this._ac.params.getNumber(key);
}
/**
* 设置trigger类型参数的值
*/
public setTrigger(key: string) {
this._ac.params.setTrigger(key);
}
/**
* 重置trigger类型参数的值
*/
public resetTrigger(key: string) {
this._ac.params.resetTrigger(key);
}
/**
* 设置autoTrigger类型参数的值autoTrigger类型参数不需要主动reset每次状态机更新结束后会自动reset
*/
public autoTrigger(key: string) {
this._ac.params.autoTrigger(key);
}
/**
* 无视条件直接跳转状态
* @param 状态名
*/
public play(stateName: string) {
if (!this._hasInit) {
return;
}
this._ac.play(stateName);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "701554ae-6d5e-4606-97fd-fbb86dce0eaf",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,81 @@
import AnimatorController from "./AnimatorController";
/** 参数类型 */
export enum ParamType {
COMPLETE = 0,
BOOLEAN = 1,
NUMBER = 2,
TRIGGER = 3,
AUTO_TRIGGER = 4
}
/** 逻辑类型 */
export enum LogicType {
EQUAL = 0,
NOTEQUAL = 1,
GREATER = 2,
LESS = 3,
GREATER_EQUAL = 4,
LESS_EQUAL = 5
}
/**
* 单项条件
*/
export default class AnimatorCondition {
private _ac: AnimatorController = null;
/** 此条件对应的参数名 */
private _param: string = "";
/** 此条件对应的值 */
private _value: number = 0;
/** 此条件与值比较的逻辑 */
private _logic: LogicType = LogicType.EQUAL;
constructor(data: any, ac: AnimatorController) {
this._ac = ac;
this._param = data.param;
this._value = data.value;
this._logic = data.logic;
}
public getParamName() {
return this._param;
}
public getParamType(): ParamType {
return this._ac.params.getParamType(this._param);
}
/** 判断此条件是否满足 */
public check(): boolean {
let type: ParamType = this.getParamType();
if (type === ParamType.BOOLEAN) {
return this._ac.params.getBool(this._param) === this._value;
} else if (type === ParamType.NUMBER) {
let value: number = this._ac.params.getNumber(this._param);
switch (this._logic) {
case LogicType.EQUAL:
return value === this._value;
case LogicType.NOTEQUAL:
return value !== this._value;
case LogicType.GREATER:
return value > this._value;
case LogicType.LESS:
return value < this._value;
case LogicType.GREATER_EQUAL:
return value >= this._value;
case LogicType.LESS_EQUAL:
return value <= this._value;
default:
return false;
}
} else if (type === ParamType.AUTO_TRIGGER) {
return this._ac.params.getAutoTrigger(this._param) !== 0;
} else if (type === ParamType.TRIGGER) {
return this._ac.params.getTrigger(this._param) !== 0;
} else {
cc.error(`[AnimatorCondition.check] 错误的type: ${type}`);
return false;
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "ed0e9617-42fd-4623-adbf-e10f876c7dd6",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,118 @@
import AnimatorBase from "./AnimatorBase";
import AnimatorParams from "./AnimatorParams";
import AnimatorState from "./AnimatorState";
/**
* 状态机控制类
*/
export default class AnimatorController {
private _jsonData: any = null;
private _animator: AnimatorBase = null;
private _params: AnimatorParams = null;
private _states: Map<string, AnimatorState> = null;
private _anyState: AnimatorState = null;
private _curState: AnimatorState = null;
/** 状态切换次数 */
private _changeCount: number = 0;
/** 对应animComplete的状态 */
public animCompleteState: AnimatorState = null;
/** 动画播放完毕的标记 */
public animComplete: boolean = false;
/** 当前运行的状态 */
public get curState(): AnimatorState { return this._curState; }
public get params(): AnimatorParams { return this._params; }
constructor(player: AnimatorBase, json: any) {
this._animator = player;
this._jsonData = json;
this._states = new Map<string, AnimatorState>();
this._params = new AnimatorParams(json.parameters);
this.init(json);
}
/**
* 初始化状态机所有动画状态
*/
private init(json: any) {
if (json.states.length <= 0) {
cc.error(`[AnimatorController.init] 状态机json错误`);
return;
}
let defaultState: string = json.defaultState;
this._anyState = new AnimatorState(json.anyState, this);
for (let i = 0; i < json.states.length; i++) {
let state: AnimatorState = new AnimatorState(json.states[i], this);
this._states.set(state.name, state);
}
this.changeState(defaultState);
}
private updateState() {
this._curState.checkAndTrans();
if (this._curState !== this._anyState && this._anyState !== null) {
this._anyState.checkAndTrans();
}
}
/**
* 更新状态机逻辑
*/
public updateAnimator() {
// 重置计数
this._changeCount = 0;
this.updateState();
// 重置动画完成标记
if (this.animComplete && this.animCompleteState.loop) {
this.animComplete = false;
}
// 重置autoTrigger
this.params.resetAllAutoTrigger();
}
public onAnimationComplete() {
this.animComplete = true;
this.animCompleteState = this._curState;
// cc.log(`animation complete: ${this._curState.name}`);
}
/**
* 无视条件直接跳转状态
* @param 状态名
*/
public play(stateName: string) {
if (!this._states.has(stateName) || this._curState.name === stateName) {
return;
}
// 重置动画完成标记
this.animComplete = false;
this.changeState(stateName);
}
/**
* 切换动画状态
*/
public changeState(stateName: string) {
this._changeCount++;
if (this._changeCount > 1000) {
cc.error('[AnimatorController.changeState] error: 状态切换递归调用超过1000次transition设置可能出错!');
return;
}
if (this._states.has(stateName) && (this._curState === null || this._curState.name !== stateName)) {
let oldState = this._curState;
this._curState = this._states.get(stateName);
this._animator.onStateChange(oldState, this._curState);
this.updateState();
} else {
cc.error(`[AnimatorController.changeState] error state: ${stateName}`);
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "a787c52f-976b-4787-89cb-fb8f430d2ad2",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,121 @@
import { ParamType } from "./AnimatorCondition";
/**
* 参数结构
*/
interface Param {
type: ParamType;
value: number;
}
/**
* 状态机参数
*/
export default class AnimatorParams {
private _paramMap: Map<string, Param> = new Map();
constructor(dataArr: any[]) {
dataArr.forEach((data: any) => {
let param: Param = {
type: data.type,
value: data.init
};
this._paramMap.set(data.param, param);
});
}
public getParamType(key: string): ParamType {
let param: Param = this._paramMap.get(key);
if (param) {
return param.type;
} else {
return null;
}
}
public setNumber(key: string, value: number) {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.NUMBER) {
param.value = value;
}
}
public setBool(key: string, value: boolean) {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.BOOLEAN) {
param.value = value ? 1 : 0;
}
}
public setTrigger(key: string) {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.TRIGGER) {
param.value = 1;
}
}
public resetTrigger(key: string) {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.TRIGGER) {
param.value = 0;
}
}
public autoTrigger(key: string) {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.AUTO_TRIGGER) {
param.value = 1;
}
}
public resetAutoTrigger(key: string) {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.AUTO_TRIGGER) {
param.value = 0;
}
}
public resetAllAutoTrigger() {
this._paramMap.forEach((param: Param, key: string) => {
if (param.type === ParamType.AUTO_TRIGGER) {
param.value = 0;
}
});
}
public getNumber(key: string): number {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.NUMBER) {
return param.value;
} else {
return 0;
}
}
public getBool(key: string): number {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.BOOLEAN) {
return param.value;
} else {
return 0;
}
}
public getTrigger(key: string): number {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.TRIGGER) {
return param.value;
} else {
return 0;
}
}
public getAutoTrigger(key: string): number {
let param: Param = this._paramMap.get(key);
if (param && param.type === ParamType.AUTO_TRIGGER) {
return param.value;
} else {
return 0;
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "8ffa0112-1623-4dfb-9787-3a11097540e4",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,55 @@
import AnimatorController from "./AnimatorController";
import AnimatorTransition from "./AnimatorTransition";
/**
* 状态管理类
*/
export default class AnimatorState {
private _name: string = "";
private _motion: string = "";
private _loop: boolean = false;
private _speed: number = 1;
private _multi: string = "";
private _transitions: AnimatorTransition[] = [];
private _ac: AnimatorController = null;
/** 状态名 */
public get name() { return this._name; }
/** 动画名 */
public get motion() { return this._motion; }
/** 动画是否循环播放 */
public get loop() { return this._loop; }
/** 动画播放速度 */
public get speed() { return this._speed; }
/** 动画播放速度的混合参数 */
public get multi() { return this._multi; }
constructor(data: any, ac: AnimatorController) {
this._name = data.state;
this._motion = data.motion || '';
this._loop = data.loop || false;
this._speed = data.speed || 1;
this._multi = data.multiplier || '';
this._ac = ac;
for (let i = 0; i < data.transitions.length; i++) {
let transition: AnimatorTransition = new AnimatorTransition(data.transitions[i], ac);
transition.isValid() && this._transitions.push(transition);
}
}
/**
* 判断各个分支是否满足条件,满足则转换状态
*/
public checkAndTrans() {
for (let i = 0; i < this._transitions.length; i++) {
let transition: AnimatorTransition = this._transitions[i];
if (transition && transition.check()) {
transition.doTrans();
return;
}
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "929e1ea1-3a0b-4764-98a7-84ae9d325e82",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,25 @@
/**
* 状态逻辑基类
*/
export default class AnimatorStateLogic {
/**
* 进入状态时调用
* @virtual
*/
public onEntry() {
}
/**
* 每次状态机逻辑更新时调用
* @virtual
*/
public onUpdate() {
}
/**
* 离开状态时调用
* @virtual
*/
public onExit() {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "66b34e37-c416-4284-b5dc-55a4a8004a7d",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,71 @@
import AnimatorCondition, { ParamType } from "./AnimatorCondition";
import AnimatorController from "./AnimatorController";
/**
* 状态过渡类
*/
export default class AnimatorTransition {
private _toStateName: string = '';
private _hasExitTime: boolean = false;
private _conditions: AnimatorCondition[] = [];
private _ac: AnimatorController = null;
constructor(data: any, ac: AnimatorController) {
this._toStateName = data.toState;
this._hasExitTime = data.hasExitTime;
this._ac = ac;
for (let i = 0; i < data.conditions.length; i++) {
let condition: AnimatorCondition = new AnimatorCondition(data.conditions[i], ac);
this._conditions.push(condition);
}
}
/**
* 返回该transition是否有效当未勾选hasExitTime以及没有添加任何condition时此transition无效并忽略
*/
public isValid(): boolean {
return this._hasExitTime || this._conditions.length > 0;
}
/**
* 判断是否满足所有转换条件
*/
public check(): boolean {
if (this._toStateName === this._ac.curState.name) {
return false;
}
if (this._hasExitTime && (this._ac.curState !== this._ac.animCompleteState || !this._ac.animComplete)) {
return false;
}
for (let i = 0; i < this._conditions.length; i++) {
if (!this._conditions[i].check()) {
return false;
}
}
return true;
}
/**
* 转换状态
*/
public doTrans() {
// 满足条件时重置动画播完标记
if (this._hasExitTime) {
this._ac.animComplete = false;
}
// 满足状态转换条件时重置trigger和autoTrigger
for (let i = 0; i < this._conditions.length; i++) {
let type = this._conditions[i].getParamType();
let name = this._conditions[i].getParamName();
if (type === ParamType.TRIGGER) {
this._ac.params.resetTrigger(name);
} else if (type === ParamType.AUTO_TRIGGER) {
this._ac.params.resetAutoTrigger(name);
}
}
this._ac.changeState(this._toStateName);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "488defce-de0a-4628-987e-cee1f6cf96f2",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "64382c67-97b0-472c-9e01-a61341a0f16c",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "1aa00128-3386-4c14-8bd1-18e71df90d5b",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,70 @@
import AnimatorAnimation from "../../animator/AnimatorAnimation";
import AnimatorStateLogic from "../../animator/core/AnimatorStateLogic";
import SheepHit from "./SheepHit";
import SheepIdle from "./SheepIdle";
import SheepRun from "./SheepRun";
const { ccclass, property } = cc._decorator;
@ccclass
export default class AnimationScene extends cc.Component {
@property(AnimatorAnimation) Animator: AnimatorAnimation = null;
public speed: number = 0;
protected onLoad() {
let map: Map<string, AnimatorStateLogic> = new Map();
map.set('sheep_idle', new SheepIdle());
map.set('sheep_run', new SheepRun());
map.set('sheep_hit', new SheepHit(this));
this.Animator.onInit(map);
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
}
protected update(dt: number) {
let delt = this.Animator.curStateName === 'sheep_hit' ? 0 : this.speed * -this.Animator.node.scaleX * dt;
this.Animator.node.x = cc.misc.clampf(this.Animator.node.x + delt, -1000, 1000);
}
protected lateUpdate() {
this.Animator.setNumber('speed', this.speed);
this.Animator.manualUpdate();
}
protected onDestroy() {
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
}
private onKeyDown(event: cc.Event.EventKeyboard) {
let code: cc.macro.KEY = event.keyCode;
switch (code) {
case cc.macro.KEY.left:
this.Animator.node.scaleX = 1;
this.speed = 100;
break;
case cc.macro.KEY.right:
this.Animator.node.scaleX = -1;
this.speed = 100;
break;
case cc.macro.KEY.k:
this.Animator.setTrigger('hit');
default:
break;
}
}
private onKeyUp(event: cc.Event.EventKeyboard) {
let code: cc.macro.KEY = event.keyCode;
switch (code) {
case cc.macro.KEY.left:
case cc.macro.KEY.right:
this.speed = 0;
break;
default:
break;
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "14db7554-9454-4338-a487-150523459aca",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,25 @@
import AnimatorStateLogic from "../../animator/core/AnimatorStateLogic";
import AnimationScene from "./AnimationScene";
export default class SheepHit extends AnimatorStateLogic {
private _ctr: AnimationScene = null;
public constructor(ctr: AnimationScene) {
super();
this._ctr = ctr;
}
public onEntry() {
this._ctr.speed = 0;
cc.log('hit entry');
}
public onUpdate() {
this._ctr.speed = 0;
cc.log('hit update');
}
public onExit() {
cc.log('hit exit');
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "b1e94d2a-165f-4350-8035-c4e0ce55221b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,16 @@
import AnimatorStateLogic from "../../animator/core/AnimatorStateLogic";
export default class SheepIdle extends AnimatorStateLogic {
public onEntry() {
cc.log('idle entry');
}
public onUpdate() {
cc.log('idle update');
}
public onExit() {
cc.log('idle exit');
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "ffe798df-0253-48ab-bdcc-31b7c2ddc3c7",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,16 @@
import AnimatorStateLogic from "../../animator/core/AnimatorStateLogic";
export default class SheepRun extends AnimatorStateLogic {
public onEntry() {
cc.log('run entry');
}
public onUpdate() {
cc.log('run update');
}
public onExit() {
cc.log('run exit');
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "249d7306-946e-4f59-9446-b6ecc1d456a4",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "fcde15b6-7401-4e97-8d61-f6f7eab6f002",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,95 @@
import AnimatorCustomization from "../../animator/AnimatorCustomization";
import { AnimationPlayer } from "../../animator/core/AnimatorBase";
const { ccclass, property } = cc._decorator;
@ccclass
export default class CustomizationScene extends cc.Component implements AnimationPlayer {
@property(cc.Node) Cube: cc.Node = null;
private _animator: AnimatorCustomization = null;
private _curTween: cc.Tween = null;
private _call: () => void = null;
private _traget: any = null;
protected onLoad() {
this._animator = this.Cube.getComponent(AnimatorCustomization);
// 自定义动画播放必须要将实现了AnimationPlayer接口的对象传入
this._animator.onInit(this);
this.node.on(cc.Node.EventType.TOUCH_START, () => { this._animator.setTrigger('next'); }, this);
}
private move(dur: number, pos: cc.Vec3, loop: boolean) {
if (loop) {
this._curTween = cc.tween(this.Cube)
.repeatForever(
cc.tween()
.to(dur, { position: pos })
.call(() => {
this._call.call(this._traget);
})
)
.start();
} else {
this._curTween = cc.tween(this.Cube)
.to(dur, { position: pos })
.call(() => {
this._call.call(this._traget);
})
.start();
}
}
/**
* - 实现接口 AnimationPlayer
* 设置动画播放结束的回调
*/
public setFinishedCallback(callback: () => void, target: any): void {
this._call = callback;
this._traget = target;
}
/**
* - 实现接口 AnimationPlayer
* 播放动画
*/
public playAnimation(animName: string, loop: boolean): void {
this._curTween && this._curTween.stop();
if (animName === 'idle') {
if (loop) {
this._curTween = cc.tween(this.Cube)
.repeatForever(
cc.tween()
.to(1, { scale: 2 })
.to(1, { scale: 0.5 })
.call(() => {
this._call.call(this._traget);
})
)
.start();
} else {
this._curTween = cc.tween(this.Cube)
.to(1, { scale: 2 })
.to(1, { scale: 0.5 })
.call(() => {
this._call.call(this._traget);
})
.start();
}
} else if (animName === 'move1') {
this.move(2, cc.v3(500, 500, 0), loop);
} else if (animName === 'move2') {
this.move(4, cc.v3(0, 0, 0), loop);
}
}
/**
* - 实现接口 AnimationPlayer
* 缩放动画播放速率
*/
public scaleTime(scale: number): void {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "4ecb8927-f33a-4833-9ffb-8e38c1193687",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "19bb3ee7-3033-4cb7-85ea-59d38ab1797f",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@@ -0,0 +1,12 @@
import AnimatorDragonBones from "../../animator/AnimatorDragonBones";
const {ccclass, property} = cc._decorator;
@ccclass
export default class DragonBonesScene extends cc.Component {
@property(AnimatorDragonBones) Animator: AnimatorDragonBones = null;
protected onLoad() {
this.node.on(cc.Node.EventType.TOUCH_START, () => { this.Animator.setTrigger('next'); }, this);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "46c5fdeb-47df-4174-bfe0-f233c54da45b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

Some files were not shown because too many files have changed in this diff Show More