Initial commit for offline map, might break the online version.

This commit is contained in:
genxium 2022-11-19 20:58:07 +08:00
parent d4226137b6
commit 78dd9ecd85
50 changed files with 1272 additions and 2539 deletions

Binary file not shown.

View File

@ -0,0 +1 @@
{"width":128,"imagePath":"SoldierElf_tex.png","height":128,"name":"SoldierElf","SubTexture":[{"frameHeight":45,"y":1,"frameX":0,"width":34,"frameY":0,"height":44,"name":"cape","frameWidth":34,"x":70},{"width":10,"y":107,"height":14,"name":"shouder_l","x":74},{"width":11,"y":107,"height":14,"name":"forearm_l","x":61},{"width":15,"y":93,"height":16,"name":"hand_l","x":1},{"width":30,"y":61,"height":30,"name":"weapon_hand_l","x":1},{"width":8,"y":101,"height":11,"name":"thigh_l","x":86},{"width":12,"y":93,"height":17,"name":"calf_l","x":18},{"width":20,"y":113,"height":8,"name":"foot_l","x":39},{"width":28,"y":61,"height":31,"name":"pelvis","x":33},{"width":8,"y":88,"height":11,"name":"thigh_r","x":77},{"width":12,"y":88,"height":17,"name":"calf_r","x":63},{"width":20,"y":113,"height":8,"name":"foot_r","x":17},{"width":13,"y":94,"height":12,"name":"shouder_r","x":45},{"width":67,"y":1,"height":58,"name":"chest","x":1},{"width":11,"y":94,"height":17,"name":"forearm_r","x":32},{"width":14,"y":111,"height":13,"name":"hand_r","x":1},{"frameHeight":39,"y":47,"frameX":-2,"width":34,"frameY":0,"height":39,"name":"we_bl_4_f_1","frameWidth":36,"x":70}]}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "04d25c46-a15a-4390-89fd-7fdb22de884f",
"atlasJson": "{\"width\":128,\"imagePath\":\"SoldierElf_tex.png\",\"height\":128,\"name\":\"SoldierElf\",\"SubTexture\":[{\"frameHeight\":45,\"y\":1,\"frameX\":0,\"width\":34,\"frameY\":0,\"height\":44,\"name\":\"cape\",\"frameWidth\":34,\"x\":70},{\"width\":10,\"y\":107,\"height\":14,\"name\":\"shouder_l\",\"x\":74},{\"width\":11,\"y\":107,\"height\":14,\"name\":\"forearm_l\",\"x\":61},{\"width\":15,\"y\":93,\"height\":16,\"name\":\"hand_l\",\"x\":1},{\"width\":30,\"y\":61,\"height\":30,\"name\":\"weapon_hand_l\",\"x\":1},{\"width\":8,\"y\":101,\"height\":11,\"name\":\"thigh_l\",\"x\":86},{\"width\":12,\"y\":93,\"height\":17,\"name\":\"calf_l\",\"x\":18},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_l\",\"x\":39},{\"width\":28,\"y\":61,\"height\":31,\"name\":\"pelvis\",\"x\":33},{\"width\":8,\"y\":88,\"height\":11,\"name\":\"thigh_r\",\"x\":77},{\"width\":12,\"y\":88,\"height\":17,\"name\":\"calf_r\",\"x\":63},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_r\",\"x\":17},{\"width\":13,\"y\":94,\"height\":12,\"name\":\"shouder_r\",\"x\":45},{\"width\":67,\"y\":1,\"height\":58,\"name\":\"chest\",\"x\":1},{\"width\":11,\"y\":94,\"height\":17,\"name\":\"forearm_r\",\"x\":32},{\"width\":14,\"y\":111,\"height\":13,\"name\":\"hand_r\",\"x\":1},{\"frameHeight\":39,\"y\":47,\"frameX\":-2,\"width\":34,\"frameY\":0,\"height\":39,\"name\":\"we_bl_4_f_1\",\"frameWidth\":36,\"x\":70}]}",
"texture": "4a3aabb1-75b6-40ec-b107-241164a8ec23",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "4a3aabb1-75b6-40ec-b107-241164a8ec23",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"SoldierElf_tex": {
"ver": "1.0.4",
"uuid": "a969fc2f-5d11-4ac6-90e1-235b1e119802",
"rawTextureUuid": "4a3aabb1-75b6-40ec-b107-241164a8ec23",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -11.5,
"offsetY": 1.5,
"trimX": 1,
"trimY": 1,
"width": 103,
"height": 123,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "2202f4f4-b792-4dea-8302-633315aded66",
"isSubpackage": false,
"subpackageName": "",
"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 @@
{"width":128,"imagePath":"SoldierElf_tex.png","height":128,"name":"SoldierElf","SubTexture":[{"frameHeight":45,"y":1,"frameX":0,"width":34,"frameY":0,"height":44,"name":"cape","frameWidth":34,"x":70},{"width":10,"y":107,"height":14,"name":"shouder_l","x":74},{"width":11,"y":107,"height":14,"name":"forearm_l","x":61},{"width":15,"y":93,"height":16,"name":"hand_l","x":1},{"width":30,"y":61,"height":30,"name":"weapon_hand_l","x":1},{"width":8,"y":101,"height":11,"name":"thigh_l","x":86},{"width":12,"y":93,"height":17,"name":"calf_l","x":18},{"width":20,"y":113,"height":8,"name":"foot_l","x":39},{"width":28,"y":61,"height":31,"name":"pelvis","x":33},{"width":8,"y":88,"height":11,"name":"thigh_r","x":77},{"width":12,"y":88,"height":17,"name":"calf_r","x":63},{"width":20,"y":113,"height":8,"name":"foot_r","x":17},{"width":13,"y":94,"height":12,"name":"shouder_r","x":45},{"width":67,"y":1,"height":58,"name":"chest","x":1},{"width":11,"y":94,"height":17,"name":"forearm_r","x":32},{"width":14,"y":111,"height":13,"name":"hand_r","x":1},{"frameHeight":39,"y":47,"frameX":-2,"width":34,"frameY":0,"height":39,"name":"we_bl_4_f_1","frameWidth":36,"x":70}]}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "24d7bb8f-577c-4e5d-b730-56613ca8685d",
"atlasJson": "{\"width\":128,\"imagePath\":\"SoldierElf_tex.png\",\"height\":128,\"name\":\"SoldierElf\",\"SubTexture\":[{\"frameHeight\":45,\"y\":1,\"frameX\":0,\"width\":34,\"frameY\":0,\"height\":44,\"name\":\"cape\",\"frameWidth\":34,\"x\":70},{\"width\":10,\"y\":107,\"height\":14,\"name\":\"shouder_l\",\"x\":74},{\"width\":11,\"y\":107,\"height\":14,\"name\":\"forearm_l\",\"x\":61},{\"width\":15,\"y\":93,\"height\":16,\"name\":\"hand_l\",\"x\":1},{\"width\":30,\"y\":61,\"height\":30,\"name\":\"weapon_hand_l\",\"x\":1},{\"width\":8,\"y\":101,\"height\":11,\"name\":\"thigh_l\",\"x\":86},{\"width\":12,\"y\":93,\"height\":17,\"name\":\"calf_l\",\"x\":18},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_l\",\"x\":39},{\"width\":28,\"y\":61,\"height\":31,\"name\":\"pelvis\",\"x\":33},{\"width\":8,\"y\":88,\"height\":11,\"name\":\"thigh_r\",\"x\":77},{\"width\":12,\"y\":88,\"height\":17,\"name\":\"calf_r\",\"x\":63},{\"width\":20,\"y\":113,\"height\":8,\"name\":\"foot_r\",\"x\":17},{\"width\":13,\"y\":94,\"height\":12,\"name\":\"shouder_r\",\"x\":45},{\"width\":67,\"y\":1,\"height\":58,\"name\":\"chest\",\"x\":1},{\"width\":11,\"y\":94,\"height\":17,\"name\":\"forearm_r\",\"x\":32},{\"width\":14,\"y\":111,\"height\":13,\"name\":\"hand_r\",\"x\":1},{\"frameHeight\":39,\"y\":47,\"frameX\":-2,\"width\":34,\"frameY\":0,\"height\":39,\"name\":\"we_bl_4_f_1\",\"frameWidth\":36,\"x\":70}]}",
"texture": "050fb016-1a1f-4341-8367-283bfeddc4a8",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "050fb016-1a1f-4341-8367-283bfeddc4a8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"SoldierElf_tex": {
"ver": "1.0.4",
"uuid": "c62e1779-f92b-40d3-bf4f-7ab747e33d6e",
"rawTextureUuid": "050fb016-1a1f-4341-8367-283bfeddc4a8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -11.5,
"offsetY": 1.5,
"trimX": 1,
"trimY": 1,
"width": 103,
"height": 123,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -1,309 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "Bullet",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 5
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.7,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Node",
"_name": "Tail",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_level": 2,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_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
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-14,
-6,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 1,
"_custom": true,
"_file": {
"__uuid__": "b2687ac4-099e-403c-a192-ff477686f4f5"
},
"_spriteFrame": {
"__uuid__": "472df5d3-35e7-4184-9e6c-7f41bee65ee3"
},
"_texture": {
"__uuid__": "d0a82d39-bede-46c4-b698-c81ff0dedfff"
},
"_stopped": false,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 200,
"duration": -1,
"emissionRate": 999.999985098839,
"life": 0.20000000298023224,
"lifeVar": 0.5,
"_startColor": {
"__type__": "cc.Color",
"r": 202,
"g": 200,
"b": 86,
"a": 163
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 229,
"g": 255,
"b": 173,
"a": 198
},
"_endColor": {
"__type__": "cc.Color",
"r": 173,
"g": 161,
"b": 19,
"a": 214
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 107,
"g": 249,
"b": 249,
"a": 188
},
"angle": 360,
"angleVar": 360,
"startSize": 3.369999885559082,
"startSizeVar": 50,
"endSize": 30.31999969482422,
"endSizeVar": 0,
"startSpin": -47.369998931884766,
"startSpinVar": 0,
"endSpin": -47.369998931884766,
"endSpinVar": -142.11000061035156,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 7,
"y": 7
},
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": -1000,
"y": 0.5
},
"speed": 10,
"speedVar": 190.7899932861328,
"tangentialAccel": -92.11000061035156,
"tangentialAccelVar": 65.79000091552734,
"radialAccel": -671.0499877929688,
"radialAccelVar": 65.79000091552734,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "7673e0e4-bebd-4caa-8a10-a6e1e86f1b2f"
},
"fileId": "f8NGWnOBtGmZNTU+o6vnbe",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2f525bb2-80d1-4508-bdc3-d03c11587ce4"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "266c6cef-32d6-4545-b3e6-c2b75a895578"
},
"_id": ""
},
{
"__type__": "ea9650l7IJHjL2ymsB5gasO",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"localIdInBattle": null,
"linearSpeed": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "7673e0e4-bebd-4caa-8a10-a6e1e86f1b2f"
},
"fileId": "f7AuVG6IFIr5KrEg6RCeY2",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "7673e0e4-bebd-4caa-8a10-a6e1e86f1b2f",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,652 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "Root",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
}
],
"_prefab": {
"__id__": 16
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 120
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
3,
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": 2,
"groupIndex": 2,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "CoordinateLabel",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 46.68,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-5,
50,
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": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "(0, 0)",
"_N$string": "(0, 0)",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "5apzDmIE9IuaMOyF3z06sc",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "particlesystem",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_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": ""
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 1,
"_custom": true,
"_file": {
"__uuid__": "b2687ac4-099e-403c-a192-ff477686f4f5"
},
"_spriteFrame": {
"__uuid__": "472df5d3-35e7-4184-9e6c-7f41bee65ee3"
},
"_texture": null,
"_stopped": false,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 200,
"duration": -1,
"emissionRate": 999.999985098839,
"life": 0.20000000298023224,
"lifeVar": 0.5,
"_startColor": {
"__type__": "cc.Color",
"r": 202,
"g": 200,
"b": 86,
"a": 163
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 229,
"g": 255,
"b": 173,
"a": 198
},
"_endColor": {
"__type__": "cc.Color",
"r": 173,
"g": 161,
"b": 19,
"a": 214
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 107,
"g": 249,
"b": 249,
"a": 188
},
"angle": 360,
"angleVar": 360,
"startSize": 3.369999885559082,
"startSizeVar": 50,
"endSize": 30.31999969482422,
"endSizeVar": 0,
"startSpin": -47.369998931884766,
"startSpinVar": 0,
"endSpin": -47.369998931884766,
"endSpinVar": -142.11000061035156,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 7,
"y": 7
},
"_positionType": 1,
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": 0.25,
"y": 0.8600000143051147
},
"speed": 0,
"speedVar": 190.7899932861328,
"tangentialAccel": -92.11000061035156,
"tangentialAccelVar": 65.79000091552734,
"radialAccel": -671.0499877929688,
"radialAccelVar": 65.79000091552734,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "04uxaznclAmLRL13XKszPJ",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "arrowTip",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 76,
"height": 84
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
3,
182,
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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a2170e4c-df31-41ef-be73-f4f605e75821"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "e4mum5GwxNiZ0T8ouw95jJ",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "animNode",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_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": ""
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "SoldierElf",
"_animationName": "Idle1",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "affcd973-4743-48e5-9bcd-339180a6101b#24d7bb8f-577c-4e5d-b730-56613ca8685d",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "affcd973-4743-48e5-9bcd-339180a6101b"
},
"_N$dragonAtlasAsset": {
"__uuid__": "24d7bb8f-577c-4e5d-b730-56613ca8685d"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "7aN7Gcc/tBw5EGlTJVBj2+",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "b74b05YDqZFRo4OkZRFZX8k",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"lastMovedAt": 0,
"animNode": {
"__id__": 11
},
"arrowTipNode": {
"__id__": 8
},
"coordLabel": {
"__id__": 3
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "4cx75uwJJFa7U8QL187QCL",
"sync": false
}
]

View File

@ -1,6 +1,6 @@
{
"ver": "1.2.5",
"uuid": "4154eec0-d644-482f-a889-c00ae6b69958",
"uuid": "59bff7a2-23e1-4d69-bce7-afb37eae196a",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,

View File

@ -1,153 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "GuardTower",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_state": 0,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "31a63530-7811-45bc-a4ee-571faf917e35"
},
"fileId": "cb43NtzzhP0bpzlQHRRrkX",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "31a63530-7811-45bc-a4ee-571faf917e35",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,118 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_rawFiles": null,
"data": {
"__id__": 1
}
},
{
"__type__": "cc.Node",
"_name": "PolygonBoundaryBarrier",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_id": "",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 1,
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
]
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "e6gF9LdulAgYGTgO3/Pye8",
"sync": false
}
]

View File

@ -1,125 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "PolygonBoundaryShelter",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_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
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 4,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-192,
43,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f820a6ec-e7a9-46cf-9b8a-331aa3e21487"
},
"fileId": "f8scmoFllMboAtkaldeiym",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "f820a6ec-e7a9-46cf-9b8a-331aa3e21487",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,125 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "PolygonBoundaryShelterZReducer",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_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
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 3,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": "e6q3kwlllDC425mW1I4/O5"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a36d024b-a979-4d18-b089-19af313ffb82"
},
"fileId": "fajJ28qMxI0YDyTCPlWINd",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "a36d024b-a979-4d18-b089-19af313ffb82",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,132 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "TiledAnim",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 58
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "cc1486e4-5c38-4a73-a0d3-70416d0dd57f"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_id": ""
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": null,
"_clips": [],
"playOnLoad": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "1c02b0a0-859a-4467-86b3-ca39c30d1e19"
},
"fileId": "60dCvhukpIsL1FtdnqBIor",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "1c02b0a0-859a-4467-86b3-ca39c30d1e19",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,157 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "treasureNodePrefab",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"groupIndex": 0,
"_id": "",
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
441,
814,
0,
0,
0,
0,
1,
1,
1,
1
]
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "350fd890-3d28-4e53-9dfa-1bf00d857737"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_id": ""
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "9f340a31-ddfa-46c2-94c7-d11615aedcb1"
},
"fileId": "dc8aAweIBDDYuXBJblR5IA",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "9f340a31-ddfa-46c2-94c7-d11615aedcb1",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -1,167 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "treasureNodePrefab",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
},
{
"__id__": 3
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 64,
"height": 64
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PolygonCollider",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"tag": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"points": [
{
"__type__": "cc.Vec2",
"x": -50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": -50
},
{
"__type__": "cc.Vec2",
"x": 50,
"y": 50
},
{
"__type__": "cc.Vec2",
"x": -50,
"y": 50
}
],
"_id": ""
},
{
"__type__": "5eea6zlA0NHdoCk/M1pvQmb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "ec3f3234-9b84-43c2-a3cd-58b924cce8e5"
},
"fileId": "dc8aAweIBDDYuXBJblR5IA",
"sync": false
}
]

View File

@ -1,8 +0,0 @@
{
"ver": "1.2.5",
"uuid": "ec3f3234-9b84-43c2-a3cd-58b924cce8e5",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -440,7 +440,7 @@
"array": [
0,
0,
344.6705889248102,
209.57814771583418,
0,
0,
0,

View File

@ -72,7 +72,7 @@
"__id__": 3
},
{
"__id__": 8
"__id__": 9
}
],
"_active": true,
@ -158,7 +158,7 @@
"__id__": 5
},
{
"__id__": 21
"__id__": 6
}
],
"_prefab": null,
@ -221,7 +221,35 @@
"_id": "c8MqKDLJdKz7VhPwMjScDw"
},
{
"__type__": "41d30TOamhNLZKrUhneboY4",
"__type__": "09e1b/tEy5K2qaPIpqHDbae",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"BGMEffect": {
"__uuid__": "64a79efa-97de-4cb5-b2a9-01500c60573a"
},
"crashedByTrapBullet": {
"__uuid__": "1d604e42-8cee-466f-884d-e74cae21ce3b"
},
"highScoreTreasurePicked": {
"__uuid__": "0164d22c-d965-461f-867e-b30e2d56cc5c"
},
"treasurePicked": {
"__uuid__": "7704b97e-6367-420c-b7af-d0750a2bbb30"
},
"countDown10SecToEnd": {
"__uuid__": "261d1d7d-a5cc-4cb7-a737-194427055fd4"
},
"mapNode": {
"__id__": 3
},
"_id": "3crA1nz5xPSLAnCSLQIPOq"
},
{
"__type__": "47d7dy4S4lB2pxqJJlGOoai",
"_name": "",
"_objFlags": 0,
"node": {
@ -231,70 +259,47 @@
"canvasNode": {
"__id__": 2
},
"tiledAnimPrefab": {
"__uuid__": "1c02b0a0-859a-4467-86b3-ca39c30d1e19"
},
"player1Prefab": {
"__uuid__": "8a738d50-1dac-4b6e-99e1-d241f5ee7169"
},
"player2Prefab": {
"__uuid__": "1f479636-9eb8-4612-8f97-371964d6eae3"
},
"polygonBoundaryBarrierPrefab": {
"__uuid__": "4154eec0-d644-482f-a889-c00ae6b69958"
},
"keyboardInputControllerNode": {
"__id__": 6
"controlledCharacterPrefab": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"player1Prefab": null,
"player2Prefab": null,
"joystickInputControllerNode": {
"__id__": 10
},
"confirmLogoutPrefab": {
"__uuid__": "8e8c1a65-623d-42ba-97a7-820ce518ea11"
},
"simplePressToGoDialogPrefab": {
"__uuid__": "670b477e-61a1-4778-879b-35913f7c79d2"
"__id__": 7
},
"confirmLogoutPrefab": null,
"simplePressToGoDialogPrefab": null,
"boundRoomIdLabel": null,
"countdownLabel": {
"__id__": 18
},
"resultPanelPrefab": {
"__uuid__": "c4cfe3bd-c59e-4d5b-95cb-c933b120e184"
},
"gameRulePrefab": {
"__uuid__": "32b8e752-8362-4783-a4a6-1160af8b7109"
},
"findingPlayerPrefab": {
"__uuid__": "3ed4c7bc-79d0-4075-a563-d5a58ae798f9"
},
"countdownToBeginGamePrefab": {
"__uuid__": "230eeb1f-e0f9-4a41-ab6c-05b3771cbf3e"
},
"playersInfoPrefab": {
"__uuid__": "b4e519f4-e698-4403-9ff2-47b8dacb077e"
},
"countdownLabel": null,
"resultPanelPrefab": null,
"gameRulePrefab": null,
"findingPlayerPrefab": null,
"countdownToBeginGamePrefab": null,
"playersInfoPrefab": null,
"forceBigEndianFloatingNumDecoding": false,
"backgroundMapTiledIns": null,
"renderFrameIdLagTolerance": 4,
"jigglingEps1D": 0.001,
"_id": "d12gkAmppNlIzqcRDELa91"
"keyboardInputControllerNode": {
"__id__": 11
},
"_id": "4b+kZ46VhC0LCBixXEK2dk"
},
{
"__type__": "cc.Node",
"_name": "KeyboardControlsMount",
"_name": "JoystickContainer",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_children": [
{
"__id__": 16
}
],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 20
"__id__": 21
}
],
"_prefab": null,
@ -308,8 +313,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 50.4
"width": 1280,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -320,8 +325,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-341.33333,
-640,
0,
-500,
0,
0,
0,
@ -343,24 +348,24 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e6nL+1zEhLmLSaT8R/9UgD"
"_id": "81iBXkC0lFt5FFUUD0k3xE"
},
{
"__type__": "cc.Node",
"_name": "WidgetsAboveAll",
"_objFlags": 0,
"_parent": {
"__id__": 8
"__id__": 9
},
"_children": [
{
"__id__": 6
"__id__": 11
},
{
"__id__": 10
"__id__": 7
},
{
"__id__": 17
"__id__": 14
}
],
"_active": true,
@ -422,13 +427,13 @@
},
"_children": [
{
"__id__": 7
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 10
}
],
"_prefab": null,
@ -456,7 +461,7 @@
"array": [
0,
0,
344.6705889248102,
210.4441731196186,
0,
0,
0,
@ -484,7 +489,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 9
},
"_enabled": true,
"_cullingMask": 4294967295,
@ -517,20 +522,19 @@
},
{
"__type__": "cc.Node",
"_name": "JoystickContainer",
"_name": "KeyboardControlsMount",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [
{
"__id__": 11
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
"__id__": 12
},
{
"__id__": 13
}
],
"_prefab": null,
@ -544,8 +548,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 640
"width": 0,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -556,8 +560,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-500,
-341.33333,
-640,
0,
0,
0,
@ -579,175 +583,10 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "81iBXkC0lFt5FFUUD0k3xE"
"_id": "e6nL+1zEhLmLSaT8R/9UgD"
},
{
"__type__": "cc.Node",
"_name": "JoystickBG",
"_objFlags": 0,
"_parent": {
"__id__": 10
},
"_children": [
{
"__id__": 12
}
],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 400
},
"_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": "88u3wQvvdO8pbrNWhs3ifP"
},
{
"__type__": "cc.Node",
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.8,
0.8,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eybpdW/JK3aDeXxdE86VD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7d4baacd-294c-4a5d-9cd6-5d36e4394c9e"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "7dr8DOX01K7YFqWlRy1ATp"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
@ -759,93 +598,45 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "447f7cfe-e678-4424-be03-0afdab8659de"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "b28Bh9ZcpM+7K3Bd3bmNf0"
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "9cS5BRd+NKJIvGQiojJtIs"
},
{
"__type__": "cc.Widget",
"__type__": "4561aFzv9JPZLe6iIzODk2d",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 40,
"_right": 0,
"_top": 0,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c0cEsj4LpMcZZEldELidxy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 278,
"_right": 480.0000000000002,
"_top": 544,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 480,
"_originalHeight": 0,
"_id": "2cxYjEIwNO6rUtXX4WcfnV"
"_id": "5ahzSYC8pCCLVPCBYyCRfZ"
},
{
"__type__": "cc.Node",
"_name": "CountdownSeconds",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 15
}
],
"_prefab": null,
@ -901,7 +692,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
"__id__": 14
},
"_enabled": true,
"_materials": [
@ -927,11 +718,142 @@
"_id": "dfxSFl+shLcY+0v45FJtGo"
},
{
"__type__": "cc.Label",
"__type__": "cc.Node",
"_name": "JoystickBG",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 17
}
],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 400
},
"_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": "88u3wQvvdO8pbrNWhs3ifP"
},
{
"__type__": "cc.Node",
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 16
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.8,
0.8,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eybpdW/JK3aDeXxdE86VD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
"__id__": 17
},
"_enabled": true,
"_materials": [
@ -939,60 +861,114 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "9cS5BRd+NKJIvGQiojJtIs"
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7d4baacd-294c-4a5d-9cd6-5d36e4394c9e"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "7dr8DOX01K7YFqWlRy1ATp"
},
{
"__type__": "4561aFzv9JPZLe6iIzODk2d",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
"__id__": 16
},
"_enabled": true,
"_id": "5ahzSYC8pCCLVPCBYyCRfZ"
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "447f7cfe-e678-4424-be03-0afdab8659de"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": {
"__uuid__": "030d9286-e8a2-40cf-98f8-baf713f0b8c4"
},
"_id": "b28Bh9ZcpM+7K3Bd3bmNf0"
},
{
"__type__": "09e1b/tEy5K2qaPIpqHDbae",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
"__id__": 16
},
"_enabled": true,
"BGMEffect": {
"__uuid__": "64a79efa-97de-4cb5-b2a9-01500c60573a"
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 40,
"_right": 0,
"_top": 0,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c0cEsj4LpMcZZEldELidxy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"crashedByTrapBullet": {
"__uuid__": "1d604e42-8cee-466f-884d-e74cae21ce3b"
},
"highScoreTreasurePicked": {
"__uuid__": "0164d22c-d965-461f-867e-b30e2d56cc5c"
},
"treasurePicked": {
"__uuid__": "7704b97e-6367-420c-b7af-d0750a2bbb30"
},
"countDown10SecToEnd": {
"__uuid__": "261d1d7d-a5cc-4cb7-a737-194427055fd4"
},
"mapNode": {
"__id__": 3
},
"_id": "3crA1nz5xPSLAnCSLQIPOq"
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 0,
"_left": 278,
"_right": 480.0000000000002,
"_top": 544,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 480,
"_originalHeight": 0,
"_id": "2cxYjEIwNO6rUtXX4WcfnV"
},
{
"__type__": "cc.Canvas",
@ -1074,16 +1050,16 @@
},
"_enabled": true,
"translationListenerNode": {
"__id__": 10
"__id__": 7
},
"zoomingListenerNode": {
"__id__": 3
},
"stickhead": {
"__id__": 12
"__id__": 17
},
"base": {
"__id__": 11
"__id__": 16
},
"joyStickEps": 0.1,
"magicLeanLowerBound": 0.414,

View File

@ -0,0 +1,53 @@
const BaseCharacter = require("./BaseCharacter");
window.ATK_CHARACTER_STATE = {
Idle1: [0, "Idle1"],
Walking: [1, "Walking"],
Atk1: [2, "Atk1"],
};
cc.Class({
extends: BaseCharacter,
properties: {
animNode: {
type: cc.Node,
default: null
},
},
ctor() {
},
onLoad() {
BaseCharacter.prototype.onLoad.call(this);
this.characterState = ATK_CHARACTER_STATE.Idle1[0];
this.animComp = this.animNode.getComponent(dragonBones.ArmatureDisplay);
this.animComp.playAnimation(ATK_CHARACTER_STATE.Idle1[1]);
},
scheduleNewDirection(newScheduledDirection, forceAnimSwitch) {
BaseCharacter.prototype.scheduleNewDirection.call(this, newScheduledDirection, forceAnimSwitch);
if (ATK_CHARACTER_STATE.Atk1[0] == this.characterState) {
return;
}
let newCharacterState = ATK_CHARACTER_STATE.Idle1[0];
if (0 != newScheduledDirection.dx || 0 != newScheduledDirection.dy) {
newCharacterState = ATK_CHARACTER_STATE.Walking[0];
}
if (newCharacterState != this.characterState) {
switch (newCharacterState) {
case ATK_CHARACTER_STATE.Idle1[0]:
this.animComp.playAnimation(ATK_CHARACTER_STATE.Idle1[1]);
break;
case ATK_CHARACTER_STATE.Walking[0]:
this.animComp.playAnimation(ATK_CHARACTER_STATE.Walking[1]);
break;
default:
break;
}
this.characterState = newCharacterState;
}
},
});

View File

@ -1,6 +1,6 @@
{
"ver": "1.0.5",
"uuid": "ea965d25-ec82-478c-bdb2-9ac07981ab0e",
"uuid": "0b29c37b-2ac0-47be-ae68-b7b9a4b2dffb",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,

View File

@ -2,10 +2,6 @@ module.export = cc.Class({
extends: cc.Component,
properties: {
animComp: {
type: cc.Animation,
default: null,
},
lastMovedAt: {
type: cc.Float,
default: 0 // In "GMT milliseconds"
@ -21,24 +17,14 @@ module.export = cc.Class({
};
},
ctor() {},
onLoad() {
const self = this;
self.clips = {
'02': 'Top',
'0-2': 'Bottom',
'-20': 'Left',
'20': 'Right',
'-11': 'TopLeft',
'11': 'TopRight',
'-1-1': 'BottomLeft',
'1-1': 'BottomRight'
};
const canvasNode = self.mapNode.parent;
self.mapIns = self.mapNode.getComponent("Map");
const joystickInputControllerScriptIns = canvasNode.getComponent("TouchEventsManager");
self.ctrl = joystickInputControllerScriptIns;
self.animComp = self.node.getComponent(cc.Animation);
self.animComp.play();
},
scheduleNewDirection(newScheduledDirection, forceAnimSwitch) {
@ -48,19 +34,11 @@ module.export = cc.Class({
if (forceAnimSwitch || null == this.activeDirection || (newScheduledDirection.dx != this.activeDirection.dx || newScheduledDirection.dy != this.activeDirection.dy)) {
this.activeDirection = newScheduledDirection;
this.activeDirection = newScheduledDirection;
const clipKey = newScheduledDirection.dx.toString() + newScheduledDirection.dy.toString();
const clips = (this.attacked ? this.attackedClips : this.clips);
let clip = clips[clipKey];
if (!clip) {
// Keep playing the current anim.
if (0 !== newScheduledDirection.dx || 0 !== newScheduledDirection.dy) {
cc.warn('Clip for clipKey === ' + clipKey + ' is invalid: ' + clip + '.');
}
} else {
this.animComp.play(clip);
if (this.attacked) {
cc.log(`Attacked, switching to play clipKey = ${clipKey}, clip == ${clip}, this.activeDirection == ${JSON.stringify(this.activeDirection)}, this.activeDirection == ${JSON.stringify(this.activeDirection)}.`);
if (this.animComp && this.animComp.node) {
if (0 > newScheduledDirection.dx) {
this.animComp.node.scaleX = (-1.0);
} else if (0 < newScheduledDirection.dx) {
this.animComp.node.scaleX = (1.0);
}
}
}
@ -84,13 +62,4 @@ module.export = cc.Class({
this.speed = proposedSpeed;
},
startFrozenDisplay() {
const self = this;
self.attacked = true;
},
stopFrozenDisplay() {
const self = this;
self.attacked = false;
},
});

View File

@ -1,201 +0,0 @@
module.export = cc.Class({
extends: cc.Component,
properties: {
localIdInBattle: {
default: null,
},
linearSpeed: {
default: 0.0,
},
},
ctor() {
this.ctrl = null;
this.activeDirection = null;
},
onLoad() {
},
_calculateVecToMoveByWithChosenDir(elapsedTime, sDir) {
if (0 == sDir.dx && 0 == sDir.dy) {
return cc.v2();
}
const self = this;
const distanceToMove = (self.linearSpeed * elapsedTime);
const denominator = Math.sqrt(sDir.dx * sDir.dx + sDir.dy * sDir.dy);
const unitProjDx = (sDir.dx / denominator);
const unitProjDy = (sDir.dy / denominator);
return cc.v2(
distanceToMove * unitProjDx,
distanceToMove * unitProjDy,
);
},
_calculateVecToMoveBy(elapsedTime) {
const self = this;
if (null == self.activeDirection) {
return null;
}
// Note that `sDir` used in this method MUST BE a copy in RAM.
let sDir = {
dx: self.activeDirection.dx,
dy: self.activeDirection.dy,
};
if (0 == sDir.dx && 0 == sDir.dy) {
return cc.v2();
}
return self._calculateVecToMoveByWithChosenDir(elapsedTime, sDir);
},
_canMoveBy(vecToMoveBy) {
return true;
},
update(dt) {
// Used only for EXTRAPOLATING the position of this bullet. The position might be corrected within `setData` as well.
const self = this;
if (null != self.bulletMaxDist) {
const dxMoved = self.node.position.x - self.startAtPoint.x;
const dyMoved = self.node.position.y - self.startAtPoint.y;
const distanceMoved = Math.sqrt(dxMoved * dxMoved + dyMoved * dyMoved)
self.node.opacity = 255*(1 - distanceMoved/self.bulletMaxDist);
}
const vecToMoveBy = self._calculateVecToMoveBy(dt);
if (null == vecToMoveBy) {
return;
}
if (self._canMoveBy(vecToMoveBy)) {
self.node.position = self.node.position.add(vecToMoveBy);
}
},
_calculateAngle(dx, dy) {
if (dx == 0) {
if (dy > 0) {
return 90;
}
if (dy < 0) {
return -90;
}
}
if (dx > 0) {
if (dy == 0) {
return 0;
}
if (dy > 0) {
return 45;
}
if (dy < 0) {
return -45;
}
}
if (dx < 0) {
if (dy == 0) {
return 180;
}
if (dy > 0) {
return 135;
}
if (dy < 0) {
return -135;
}
}
return null;
},
setData(bulletLocalIdInBattle, bulletInfo, dtFromMapUpdate) {
const targetNode = this.node;
if (true == bulletInfo.removed) {
return false;
}
if (null == bulletInfo.startAtPoint || null == bulletInfo.endAtPoint) {
console.error(`Init bullet direction error, startAtPoint:${bulletInfo.startAtPoint}, endAtPoint:${bulletInfo.endAtPoint}`);
return false;
}
this.localIdInBattle = bulletLocalIdInBattle;
this.linearSpeed = bulletInfo.linearSpeed * 1000000000; // The `bullet.LinearSpeed` on server-side is denoted in pts/nanoseconds.
const dx = bulletInfo.endAtPoint.x - bulletInfo.startAtPoint.x;
const dy = bulletInfo.endAtPoint.y - bulletInfo.startAtPoint.y;
const discretizedDir = this.ctrl.discretizeDirection(dx, dy, this.ctrl.joyStickEps);
const baseAngle = 0;
const angleToRotate = baseAngle - this._calculateAngle(discretizedDir.dx, discretizedDir.dy);
if (null == angleToRotate) {
return false;
}
set2dRotation(targetNode, angleToRotate);
const newPos = cc.v2(
bulletInfo.x,
bulletInfo.y
);
if (null == this.activeDirection) {
// Initialization.
this.startAtPoint = bulletInfo.startAtPoint;
this.endAtPoint = bulletInfo.endAtPoint;
this.bulletMaxDist = 600.0; // Hardcoded temporarily, matching that in "<backend>/models/room.go". -- YFLu, 2019-09-05.
targetNode.setPosition(newPos);
this.activeDirection = {
dx: 0,
dy: 0,
};
return true;
}
const oldPos = cc.v2(
targetNode.x,
targetNode.y,
);
const toMoveByVec = newPos.sub(oldPos);
const toMoveByVecMag = toMoveByVec.mag();
const toTeleportDisThreshold = (this.linearSpeed * dtFromMapUpdate * 100);
const notToMoveDisThreshold = (this.linearSpeed * dtFromMapUpdate * 0.5);
if (toMoveByVecMag < notToMoveDisThreshold) {
// To stop extrapolated moving.
this.activeDirection = {
dx: 0,
dy: 0,
};
} else {
if (toMoveByVecMag > toTeleportDisThreshold) {
console.log("Bullet ", bulletLocalIdInBattle, " is teleporting! Having toMoveByVecMag == ", toMoveByVecMag, ", toTeleportDisThreshold == ", toTeleportDisThreshold);
// To stop extrapolated moving.
this.activeDirection = {
dx: 0,
dy: 0
};
// Deliberately NOT using `cc.Action`. -- YFLu, 2019-09-04
targetNode.setPosition(newPos);
} else {
// The common case which is suitable for interpolation.
const normalizedDir = {
dx: toMoveByVec.x / toMoveByVecMag,
dy: toMoveByVec.y / toMoveByVecMag,
};
if (isNaN(normalizedDir.dx) || isNaN(normalizedDir.dy)) {
this.activeDirection = {
dx: 0,
dy: 0,
};
} else {
this.activeDirection = normalizedDir;
}
}
}
return true;
},
});

View File

@ -1,8 +1,7 @@
const BasePlayer = require("./BasePlayer");
const AttackingCharacter = require("./AttackingCharacter");
cc.Class({
extends: BasePlayer,
// LIFE-CYCLE CALLBACKS:
extends: AttackingCharacter,
properties: {
arrowTipNode: {
type: cc.Node,
@ -14,21 +13,11 @@ cc.Class({
}
},
start() {
BasePlayer.prototype.start.call(this);
AttackingCharacter.prototype.start.call(this);
},
onLoad() {
BasePlayer.prototype.onLoad.call(this);
this.attackedClips = {
'01': 'attackedLeft',
'0-1': 'attackedRight',
'-20': 'attackedLeft',
'20': 'attackedRight',
'-21': 'attackedLeft',
'21': 'attackedRight',
'-2-1': 'attackedLeft',
'2-1': 'attackedRight'
};
AttackingCharacter.prototype.onLoad.call(this);
this.arrowTipNode.active = false;
if (!this.mapIns.showCriticalCoordinateLabels) {
@ -51,7 +40,7 @@ cc.Class({
},
update(dt) {
BasePlayer.prototype.update.call(this, dt);
AttackingCharacter.prototype.update.call(this, dt);
if (this.mapIns.showCriticalCoordinateLabels) {
this.coordLabel.string = `(${this.node.x.toFixed(2)}, ${this.node.y.toFixed(2)})`;
}

View File

@ -40,6 +40,10 @@ cc.Class({
type: cc.Node,
default: null,
},
controlledCharacterPrefab: {
type: cc.Prefab,
default: null,
},
player1Prefab: {
type: cc.Prefab,
default: null,
@ -91,10 +95,6 @@ cc.Class({
forceBigEndianFloatingNumDecoding: {
default: false,
},
backgroundMapTiledIns: {
type: cc.TiledMap,
default: null
},
renderFrameIdLagTolerance: {
type: cc.Integer,
default: 4 // implies (renderFrameIdLagTolerance >> inputScaleFrames) count of inputFrameIds
@ -292,8 +292,6 @@ cc.Class({
const self = this;
const mapNode = self.node;
const canvasNode = mapNode.parent;
self.countdownLabel.string = "";
self.countdownNanos = null;
// Clearing previous info of all players. [BEGINS]
self.collisionPlayerIndexPrefix = (1 << 17); // For tracking the movements of players
@ -327,12 +325,20 @@ cc.Class({
self.battleState = ALL_BATTLE_STATES.WAITING;
if (self.countdownLabel) {
self.countdownLabel.string = "";
}
self.countdownNanos = null;
if (self.findingPlayerNode) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.init();
}
safelyAddChild(self.widgetsAboveAllNode, self.playersInfoNode);
safelyAddChild(self.widgetsAboveAllNode, self.findingPlayerNode);
if (self.playersInfoNode) {
safelyAddChild(self.widgetsAboveAllNode, self.playersInfoNode);
}
if (self.findingPlayerNode) {
safelyAddChild(self.widgetsAboveAllNode, self.findingPlayerNode);
}
},
onLoad() {
@ -464,7 +470,9 @@ cc.Class({
const x0 = boundaryObj.anchor.x,
y0 = boundaryObj.anchor.y;
const newBarrier = self.collisionSys.createPolygon(x0, y0, Array.from(boundaryObj, p => { return [p.x, p.y]; }));
const newBarrier = self.collisionSys.createPolygon(x0, y0, Array.from(boundaryObj, p => {
return [p.x, p.y];
}));
if (self.showCriticalCoordinateLabels) {
for (let i = 0; i < boundaryObj.length; ++i) {
@ -488,7 +496,7 @@ cc.Class({
barrierVertLabelNode.setPosition(cc.v2(wx, wy));
const barrierVertLabel = barrierVertLabelNode.addComponent(cc.Label);
barrierVertLabel.fontSize = 12;
barrierVertLabel.lineHeight = barrierVertLabel.fontSize+1;
barrierVertLabel.lineHeight = barrierVertLabel.fontSize + 1;
barrierVertLabel.string = `(${wx.toFixed(1)}, ${wy.toFixed(1)})`;
safelyAddChild(self.node, barrierVertLabelNode);
setLocalZOrder(barrierVertLabelNode, 5);
@ -608,10 +616,12 @@ cc.Class({
self._initPlayerRichInfoDict(players, playerMetas);
// Show the top status indicators for IN_BATTLE
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
}
}
self.renderFrameId = rdf.id;
@ -629,7 +639,7 @@ cc.Class({
const canvasNode = self.canvasNode;
self.ctrl = canvasNode.getComponent("TouchEventsManager");
self.enableInputControls();
if (self.countdownToBeginGameNode.parent) {
if (self.countdownToBeginGameNode && self.countdownToBeginGameNode.parent) {
self.countdownToBeginGameNode.parent.removeChild(self.countdownToBeginGameNode);
}
self.transitToState(ALL_MAP_STATES.VISUAL);
@ -751,10 +761,11 @@ cc.Class({
spawnPlayerNode(joinIndex, vx, vy, playerRichInfo) {
const self = this;
const newPlayerNode = 1 == joinIndex ? cc.instantiate(self.player1Prefab) : cc.instantiate(self.player2Prefab); // hardcoded for now, car color determined solely by joinIndex
const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter");
const wpos = self.virtualGridToWorldPos(vx, vy);
newPlayerNode.setPosition(cc.v2(wpos[0], wpos[1]));
newPlayerNode.getComponent("SelfPlayer").mapNode = self.node;
playerScriptIns.mapNode = self.node;
const cpos = self.virtualGridToPlayerColliderPos(vx, vy, playerRichInfo);
const d = playerRichInfo.colliderRadius * 2,
x0 = cpos[0],
@ -769,7 +780,6 @@ cc.Class({
setLocalZOrder(newPlayerNode, 5);
newPlayerNode.active = true;
const playerScriptIns = newPlayerNode.getComponent("SelfPlayer");
playerScriptIns.scheduleNewDirection({
dx: playerRichInfo.dir.dx,
dy: playerRichInfo.dir.dy
@ -933,23 +943,29 @@ cc.Class({
self._initPlayerRichInfoDict(players, playerMetas);
// Show the top status indicators for IN_BATTLE
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in playerMetas) {
const playerMeta = playerMetas[i];
playersInfoScriptIns.updateData(playerMeta);
}
}
console.log("Calling `onBattleReadyToStart` with:", playerMetas);
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.hideExitButton();
findingPlayerScriptIns.updatePlayersInfo(playerMetas);
if (self.findingPlayerNode) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.hideExitButton();
findingPlayerScriptIns.updatePlayersInfo(playerMetas);
}
// Delay to hide the "finding player" GUI, then show a countdown clock
window.setTimeout(() => {
self.hideFindingPlayersGUI();
const countDownScriptIns = self.countdownToBeginGameNode.getComponent("CountdownToBeginGame");
countDownScriptIns.setData();
self.showPopupInCanvas(self.countdownToBeginGameNode);
}, 1500);
if (self.countdownToBeginGameNode) {
window.setTimeout(() => {
self.hideFindingPlayersGUI();
const countDownScriptIns = self.countdownToBeginGameNode.getComponent("CountdownToBeginGame");
countDownScriptIns.setData();
self.showPopupInCanvas(self.countdownToBeginGameNode);
}, 1500);
}
},
applyRoomDownsyncFrameDynamics(rdf) {

View File

@ -1,326 +0,0 @@
const COLLISION_WITH_PLAYER_STATE = {
WALKING_COLLIDABLE: 0,
STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM: 1,
STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM: 2,
STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM: 3,
STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM: 4,
STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM: 5,
STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM: 6,
WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER: 7,
STILL_NEAR_NOBODY_PLAYING_ANIM: 8,
};
const STILL_NEAR_SELF_PLAYER_STATE_SET = new Set();
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM);
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM);
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM);
STILL_NEAR_SELF_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM);
const STILL_NEAR_OTHER_PLAYER_STATE_SET = new Set();
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM);
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM);
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM);
STILL_NEAR_OTHER_PLAYER_STATE_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM);
const STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET = new Set();
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM);
STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.add(COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM);
function transitWalkingConditionallyCollidableToUnconditionallyCollidable(currentCollisionWithPlayerState) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE;
}
return currentCollisionWithPlayerState;
}
function transitUponSelfPlayerLeftProximityArea(currentCollisionWithPlayerState) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER;
}
return currentCollisionWithPlayerState;
}
function transitDueToNoBodyInProximityArea(currentCollisionWithPlayerState) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM:
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER;
}
return currentCollisionWithPlayerState;
}
function transitToPlayingStunnedAnim(currentCollisionWithPlayerState, dueToSelfPlayer, dueToOtherPlayer) {
if (dueToSelfPlayer) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE:
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM;
}
}
if (dueToOtherPlayer) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM;
}
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
function transitDuringPlayingStunnedAnim(currentCollisionWithPlayerState, dueToSelfPlayerComesIntoProximity, dueToOtherPlayerComesIntoProximity) {
if (dueToSelfPlayerComesIntoProximity) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM;
}
}
if (dueToOtherPlayerComesIntoProximity) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM;
}
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
function transitStunnedAnimPlayingToPlayed(currentCollisionWithPlayerState, forceNotCollidableWithOtherPlayer) {
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYING_ANIM:
return COLLISION_WITH_PLAYER_STATE.STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM;
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_NOBODY_PLAYING_ANIM:
return (true == forceNotCollidableWithOtherPlayer ? COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER : COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE);
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
function transitStunnedAnimPlayedToWalking(currentCollisionWithPlayerState) {
/*
* Intentionally NOT transiting for
*
* - STILL_NEAR_SELF_PLAYER_NEAR_OTHER_PLAYER_PLAYED_ANIM, or
* - STILL_NEAR_SELF_PLAYER_ONLY_PLAYED_ANIM,
*
* which should be transited upon leaving of "SelfPlayer".
*/
switch (currentCollisionWithPlayerState) {
case COLLISION_WITH_PLAYER_STATE.STILL_NEAR_OTHER_PLAYER_ONLY_PLAYED_ANIM:
return COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER;
}
// TODO: Any error to throw?
return currentCollisionWithPlayerState;
}
const BasePlayer = require("./BasePlayer");
cc.Class({
extends: BasePlayer,
// LIFE-CYCLE CALLBACKS:
start() {
BasePlayer.prototype.start.call(this);
this.scheduleNewDirection(this._generateRandomDirection());
},
onLoad() {
BasePlayer.prototype.onLoad.call(this);
const self = this;
this.collisionWithPlayerState = COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE;
this.clips = {
'01': 'FlatHeadSisterRunTop',
'0-1': 'FlatHeadSisterRunBottom',
'-20': 'FlatHeadSisterRunLeft',
'20': 'FlatHeadSisterRunRight',
'-21': 'FlatHeadSisterRunTopLeft',
'21': 'FlatHeadSisterRunTopRight',
'-2-1': 'FlatHeadSisterRunBottomLeft',
'2-1': 'FlatHeadSisterRunBottomRight'
};
self.onStunnedAnimPlayedSafe = () => {
const oldCollisionWithPlayerState = self.collisionWithPlayerState;
self.collisionWithPlayerState = transitStunnedAnimPlayingToPlayed(this.collisionWithPlayerState, true);
if (oldCollisionWithPlayerState == self.collisionWithPlayerState || !self.node) return;
self.scheduleNewDirection(self._generateRandomDirection());
self.collisionWithPlayerState = transitStunnedAnimPlayedToWalking(self.collisionWithPlayerState);
setTimeout(() => {
self.collisionWithPlayerState = transitWalkingConditionallyCollidableToUnconditionallyCollidable(self.collisionWithPlayerState);
}, 5000);
};
self.onStunnedAnimPlayedSafeAction = cc.callFunc(self.onStunnedAnimPlayedSafe, self);
self.playStunnedAnim = () => {
let colliededAction1 = cc.rotateTo(0.2, -15);
let colliededAction2 = cc.rotateTo(0.3, 15);
let colliededAction3 = cc.rotateTo(0.2, 0);
self.node.runAction(cc.sequence(
cc.callFunc(() => {
self.player.pause()
}, self),
colliededAction1,
colliededAction2,
colliededAction3,
cc.callFunc(() => {
self.player.resume()
}, self),
self.onStunnedAnimPlayedSafeAction
));
// NOTE: Use <cc.Animation>.on('stop', self.onStunnedAnimPlayedSafe) if necessary.
}
},
_canMoveBy(vecToMoveBy) {
if (COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE_WITH_SELF_PLAYER_BUT_NOT_OTHER_PLAYER != this.collisionWithPlayerState && COLLISION_WITH_PLAYER_STATE.WALKING_COLLIDABLE != this.collisionWithPlayerState) {
return false;
}
const superRet = BasePlayer.prototype._canMoveBy.call(this, vecToMoveBy);
const self = this;
const computedNewDifferentPosLocalToParentWithinCurrentFrame = self.node.position.add(vecToMoveBy);
const currentSelfColliderCircle = self.node.getComponent("cc.CircleCollider");
let nextSelfColliderCircle = null;
if (0 < self.contactedBarriers.length || 0 < self.contactedNPCPlayers.length || 0 < self.contactedControlledPlayers) {
/* To avoid unexpected buckling. */
const mutatedVecToMoveBy = vecToMoveBy.mul(2);
nextSelfColliderCircle = {
position: self.node.position.add(vecToMoveBy.mul(2)).add(currentSelfColliderCircle.offset),
radius: currentSelfColliderCircle.radius,
};
} else {
nextSelfColliderCircle = {
position: computedNewDifferentPosLocalToParentWithinCurrentFrame.add(currentSelfColliderCircle.offset),
radius: currentSelfColliderCircle.radius,
};
}
for (let aCircleCollider of self.contactedControlledPlayers) {
let contactedCircleLocalToParentWithinCurrentFrame = {
position: aCircleCollider.node.position.add(aCircleCollider.offset),
radius: aCircleCollider.radius,
};
if (cc.Intersection.circleCircle(contactedCircleLocalToParentWithinCurrentFrame, nextSelfColliderCircle)) {
return false;
}
}
return superRet;
},
update(dt) {
BasePlayer.prototype.update.call(this, dt);
},
onCollisionEnter(other, self) {
BasePlayer.prototype.onCollisionEnter.call(this, other, self);
const playerScriptIns = self.getComponent(self.node.name);
switch (other.node.name) {
case "SelfPlayer":
playerScriptIns._addContactedControlledPlayers(other);
if (1 == playerScriptIns.contactedControlledPlayers.length) {
// When "SelfPlayer" comes into proximity area.
if (!STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.has(playerScriptIns.collisionWithPlayerState)) {
playerScriptIns.collisionWithPlayerState = transitToPlayingStunnedAnim(playerScriptIns.collisionWithPlayerState, true, false);
playerScriptIns.playStunnedAnim();
} else {
playerScriptIns.collisionWithPlayerState = transitDuringPlayingStunnedAnim(playerScriptIns.collisionWithPlayerState, true, false);
}
}
break;
case "NPCPlayer":
if (1 == playerScriptIns.contactedNPCPlayers.length) {
// When one of the other "OtherPlayer"s comes into proximity area.
if (!STILL_SHOULD_NOT_PLAY_STUNNED_ANIM_SET.has(playerScriptIns.collisionWithPlayerState)) {
const oldState = playerScriptIns.collisionWithPlayerState;
playerScriptIns.collisionWithPlayerState = transitToPlayingStunnedAnim(oldState, false, true);
if (playerScriptIns.collisionWithPlayerState != oldState) {
playerScriptIns.playStunnedAnim();
}
} else {
playerScriptIns.collisionWithPlayerState = transitDuringPlayingStunnedAnim(playerScriptIns.collisionWithPlayerState, false, true);
}
}
break;
default:
break;
}
},
onCollisionStay(other, self) {
// TBD.
},
onCollisionExit(other, self) {
BasePlayer.prototype.onCollisionExit.call(this, other, self);
const playerScriptIns = self.getComponent(self.node.name);
switch (other.node.name) {
case "SelfPlayer":
playerScriptIns._removeContactedControlledPlayer(other);
if (0 == playerScriptIns.contactedControlledPlayers.length) {
// Special release step.
if (STILL_NEAR_SELF_PLAYER_STATE_SET.has(playerScriptIns.collisionWithPlayerState)) {
playerScriptIns.collisionWithPlayerState = transitUponSelfPlayerLeftProximityArea(playerScriptIns.collisionWithPlayerState);
}
}
if (0 == playerScriptIns.contactedControlledPlayers.length && 0 == playerScriptIns.contactedNPCPlayers.length) {
transitDueToNoBodyInProximityArea(playerScriptIns.collisionWithPlayerState);
}
break;
case "NPCPlayer":
if (0 == playerScriptIns.contactedControlledPlayers.length && 0 == playerScriptIns.contactedNPCPlayers.length) {
transitDueToNoBodyInProximityArea(playerScriptIns.collisionWithPlayerState);
}
break;
default:
break;
}
},
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "17759956-1f8c-421f-bac2-7f4dd7ccdcda",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -17,11 +17,47 @@ cc.Class({
console.warn("+++++++ Map onDestroy()");
},
spawnPlayerNode(joinIndex, vx, vy, playerRichInfo) {
const self = this;
const newPlayerNode = cc.instantiate(self.controlledCharacterPrefab)
const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter");
const wpos = self.virtualGridToWorldPos(vx, vy);
newPlayerNode.setPosition(cc.v2(wpos[0], wpos[1]));
playerScriptIns.mapNode = self.node;
const cpos = self.virtualGridToPlayerColliderPos(vx, vy, playerRichInfo);
const d = playerRichInfo.colliderRadius * 2,
x0 = cpos[0],
y0 = cpos[1];
let pts = [[0, 0], [d, 0], [d, d], [0, d]];
const newPlayerCollider = self.collisionSys.createPolygon(x0, y0, pts);
const collisionPlayerIndex = self.collisionPlayerIndexPrefix + joinIndex;
self.collisionSysMap.set(collisionPlayerIndex, newPlayerCollider);
safelyAddChild(self.node, newPlayerNode);
setLocalZOrder(newPlayerNode, 5);
newPlayerNode.active = true;
playerScriptIns.scheduleNewDirection({
dx: playerRichInfo.dir.dx,
dy: playerRichInfo.dir.dy
}, true);
return [newPlayerNode, playerScriptIns];
},
onLoad() {
const self = this;
window.mapIns = self;
self.mainCameraNode = canvasNode.getChildByName("Main Camera");
cc.director.getCollisionManager().enabled = false;
const mapNode = self.node;
const canvasNode = mapNode.parent;
self.mainCameraNode = self.canvasNode.getChildByName("Main Camera");
self.mainCamera = self.mainCameraNode.getComponent(cc.Camera);
for (let child of self.mainCameraNode.children) {
child.setScale(1 / self.mainCamera.zoomRatio);
@ -31,37 +67,27 @@ cc.Class({
/** Init required prefab ended. */
self.inputDelayFrames = parsedBattleColliderInfo.inputDelayFrames;
self.inputScaleFrames = parsedBattleColliderInfo.inputScaleFrames;
self.inputFrameUpsyncDelayTolerance = parsedBattleColliderInfo.inputFrameUpsyncDelayTolerance;
self.inputDelayFrames = 8;
self.inputScaleFrames = 2;
self.inputFrameUpsyncDelayTolerance = 2;
self.battleDurationNanos = parsedBattleColliderInfo.battleDurationNanos;
self.rollbackEstimatedDt = parsedBattleColliderInfo.rollbackEstimatedDt;
self.rollbackEstimatedDtMillis = parsedBattleColliderInfo.rollbackEstimatedDtMillis;
self.rollbackEstimatedDtNanos = parsedBattleColliderInfo.rollbackEstimatedDtNanos;
self.maxChasingRenderFramesPerUpdate = parsedBattleColliderInfo.maxChasingRenderFramesPerUpdate;
self.rollbackEstimatedDt = 0.016667;
self.rollbackEstimatedDtMillis = 16.667;
self.rollbackEstimatedDtNanos = 16666666;
self.maxChasingRenderFramesPerUpdate = 5;
self.worldToVirtualGridRatio = parsedBattleColliderInfo.worldToVirtualGridRatio;
self.virtualGridToWorldRatio = parsedBattleColliderInfo.virtualGridToWorldRatio;
self.worldToVirtualGridRatio = 1000;
self.virtualGridToWorldRatio = 1.0 / self.worldToVirtualGridRatio;
const tiledMapIns = self.node.getComponent(cc.TiledMap);
// It's easier to just use the "barrier"s extracted by the backend (all anchor points in world coordinates), but I'd like to verify frontend tmx parser logic as well.
const fullPathOfTmxFile = cc.js.formatStr("map/%s/map", parsedBattleColliderInfo.stageName);
const fullPathOfTmxFile = cc.js.formatStr("map/%s/map", "dungeon");
cc.loader.loadRes(fullPathOfTmxFile, cc.TiledMapAsset, (err, tmxAsset) => {
if (null != err) {
console.error(err);
return;
}
/*
[WARNING]
- The order of the following statements is important, because we should have finished "_resetCurrentMatch" before the first "RoomDownsyncFrame".
- It's important to assign new "tmxAsset" before "extractBoundaryObjects", to ensure that the correct tilesets are used.
- To ensure clearance, put destruction of the "cc.TiledMap" component preceding that of "mapNode.destroyAllChildren()".
*/
tiledMapIns.tmxAsset = null;
mapNode.removeAllChildren();
self._resetCurrentMatch();
@ -71,15 +97,6 @@ cc.Class({
const newTileSize = tiledMapIns.getTileSize();
self.node.setContentSize(newMapSize.width * newTileSize.width, newMapSize.height * newTileSize.height);
self.node.setPosition(cc.v2(0, 0));
/*
* Deliberately hiding "ImageLayer"s. This dirty fix is specific to "CocosCreator v2.2.1", where it got back the rendering capability of "ImageLayer of Tiled", yet made incorrectly. In this game our "markers of ImageLayers" are rendered by dedicated prefabs with associated colliders.
*
* -- YFLu, 2020-01-23
*/
const existingImageLayers = tiledMapIns.getObjectGroups();
for (let singleImageLayer of existingImageLayers) {
singleImageLayer.node.opacity = 0;
}
let barrierIdCounter = 0;
const boundaryObjs = tileCollisionManager.extractBoundaryObjects(self.node);
@ -127,6 +144,34 @@ cc.Class({
const collisionBarrierIndex = (self.collisionBarrierIndexPrefix + barrierIdCounter);
self.collisionSysMap.set(collisionBarrierIndex, newBarrier);
}
const startRdf = {
id: window.MAGIC_ROOM_DOWNSYNC_FRAME_ID.BATTLE_START,
players: {
10: {
id: 10,
virtualGridX: 0,
virtualGridY: 0,
speed: 2*self.worldToVirtualGridRatio,
dir: {
dx: 0,
dy: 0
}
},
},
playerMetas: {
10: {
colliderRadius: 12,
},
}
};
self.selfPlayerInfo = {
id: 10
};
self._initPlayerRichInfoDict(startRdf.players, startRdf.playerMetas);
self.onRoomDownsyncFrame(startRdf);
self.battleState = ALL_BATTLE_STATES.IN_BATTLE;
});
},

View File

@ -1,13 +0,0 @@
const Bullet = require("./Bullet");
cc.Class({
extends: Bullet,
// LIFE-CYCLE CALLBACKS:
properties: {
},
onLoad() {
Bullet.prototype.onLoad.call(this);
},
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "c3bb6519-af90-4641-bb5e-5abbbcdfa6da",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -1,26 +0,0 @@
window.LOW_SCORE_TREASURE_TYPE = 1;
window.HIGH_SCORE_TREASURE_TYPE = 2;
window.LOW_SCORE_TREASURE_SCORE = 100;
window.HIGH_SCORE_TREASURE_SCORE = 200;
cc.Class({
extends: cc.Component,
properties: {
},
setData (treasureInfo) {
const self = this;
this.score = treasureInfo.score;
this.type = treasureInfo.type;
this.treasureInfo = treasureInfo;
const spriteComponent = this.node.getComponent(cc.Sprite);
const targetGid = (window.LOW_SCORE_TREASURE_TYPE == treasureInfo.type ? window.battleEntityTypeNameToGlobalGid["LowScoreTreasure"] : window.battleEntityTypeNameToGlobalGid["HighScoreTreasure"])
spriteComponent.spriteFrame = window.getOrCreateSpriteFrameForGid(targetGid).spriteFrame;
},
start() {},
})

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "5eea6ce5-0343-4776-80a4-fccd69bd099b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -1,84 +0,0 @@
cc.Class({
extends: cc.Component,
properties: {
pickedUpAnimNode: {
type: cc.Node,
default: null
},
durationMillis: {
default: 0
},
binglingAnimNode: {
type: cc.Node,
default: null
},
binglingAnimDurationMillis: {
default: 0
},
scoreLabelNode: {
type: cc.Node,
default: null
}
},
setData (treasureInfo) {
const self = this;
this.score = treasureInfo.score ? treasureInfo.score : 100 ;
this.type = treasureInfo.type ? treasureInfo.type : 1;
this.scoreLabelNode.getComponent(cc.Label).string = this.score;
const spriteComponent = this.pickedUpAnimNode.getComponent(cc.Sprite);
//hardcode treasurePNG's path.
cc.loader.loadRes("textures/treasures/"+ this.type, cc.SpriteFrame, function (err, frame) {
if(err){
cc.warn(err);
return;
}
spriteComponent.spriteFrame = frame;
})
},
// LIFE-CYCLE CALLBACKS:
update (dt) {
const changingNode = this.pickedUpAnimNode;
const elapsedMillis = Date.now() - this.startedAtMillis;
if(elapsedMillis >= this.binglingAnimDurationMillis && null != this.binglingAnimNode && true == this.binglingAnimNode.active) {
this.binglingAnimNode.active = false;
this.startedAtMillis = Date.now();
}
if(this.binglingAnimNode.active)
return;
if (elapsedMillis > this.durationMillis) {
this.node.destroy();
return;
}
if (elapsedMillis <= this.firstDurationMillis) {
let posDiff = cc.v2(0, dt * this.yIncreaseSpeed);
changingNode.setPosition(changingNode.position.add(posDiff));
this.scoreLabelNode.setPosition(this.scoreLabelNode.position.add(posDiff));
changingNode.scale += (this.scaleIncreaseSpeed*dt);
} else {
let posDiff = cc.v2(dt * this.xIncreaseSpeed , ( -1 *dt * this.yDecreaseSpeed));
changingNode.setPosition(changingNode.position.add(posDiff));
this.scoreLabelNode.setPosition(this.scoreLabelNode.position.add(posDiff));
changingNode.opacity -= dt * this.opacityDegradeSpeed;
this.scoreLabelNode.opacity -= dt * this.opacityDegradeSpeed;
}
},
onLoad() {
this.pickedUpAnimNode.scale = 0;
this.startedAtMillis = Date.now();
this.firstDurationMillis = (0.8*this.durationMillis);
this.yIncreaseSpeed = (200 *1000/this.firstDurationMillis);
this.scaleIncreaseSpeed = (2 * 1000/this.firstDurationMillis);
this.scondDurationMillis = (0.2 * this.durationMillis );
this.opacityDegradeSpeed = (255*1000/this.scondDurationMillis);
this.yDecreaseSpeed = (30*1000/this.scondDurationMillis);
this.xIncreaseSpeed = (20*1000/this.scondDurationMillis);
}
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "697ef72c-27ee-4184-9ae3-885808d58153",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -1,28 +0,0 @@
const BasePlayer = require("./BasePlayer");
cc.Class({
extends: BasePlayer,
// LIFE-CYCLE CALLBACKS:
start() {
BasePlayer.prototype.start.call(this);
},
onLoad() {
BasePlayer.prototype.onLoad.call(this);
this.clips = {
'01': 'FlatHeadSisterRunTop',
'0-1': 'FlatHeadSisterRunBottom',
'-20': 'FlatHeadSisterRunLeft',
'20': 'FlatHeadSisterRunRight',
'-21': 'FlatHeadSisterRunTopLeft',
'21': 'FlatHeadSisterRunTopRight',
'-2-1': 'FlatHeadSisterRunBottomLeft',
'2-1': 'FlatHeadSisterRunBottomRight'
};
},
update(dt) {
},
});

View File

@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "233a1795-0de3-4d7c-9ce6-c5736ade723f",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}