Commit cb905f8c authored by Tt's avatar Tt

基础版本完成

parent 7c4e1c17
......@@ -17,10 +17,10 @@
"__id__": 2
},
{
"__id__": 169
"__id__": 193
},
{
"__id__": 182
"__id__": 206
}
],
"_active": false,
......@@ -87,19 +87,19 @@
"__id__": 23
},
{
"__id__": 151
"__id__": 175
}
],
"_active": true,
"_components": [
{
"__id__": 166
"__id__": 190
},
{
"__id__": 167
"__id__": 191
},
{
"__id__": 168
"__id__": 192
}
],
"_prefab": null,
......@@ -1143,16 +1143,19 @@
"__id__": 124
},
{
"__id__": 126
"__id__": 148
},
{
"__id__": 128
"__id__": 150
},
{
"__id__": 152
}
],
"_active": true,
"_components": [
{
"__id__": 150
"__id__": 174
}
],
"_prefab": null,
......@@ -1926,8 +1929,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 457,
"height": 455
"width": 450,
"height": 452
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4507,7 +4510,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 151,
"width": 400,
"height": 0
},
"_anchorPoint": {
......@@ -5243,7 +5246,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 151,
"width": 400,
"height": 0
},
"_anchorPoint": {
......@@ -6183,16 +6186,41 @@
},
{
"__type__": "cc.Node",
"_name": "loadingLayerBase",
"_name": "voice",
"_objFlags": 0,
"_parent": {
"__id__": 23
},
"_children": [],
"_active": true,
"_components": [
"_children": [
{
"__id__": 125
},
{
"__id__": 127
},
{
"__id__": 129
},
{
"__id__": 135
},
{
"__id__": 136
},
{
"__id__": 141
},
{
"__id__": 143
},
{
"__id__": 145
}
],
"_active": false,
"_components": [
{
"__id__": 147
}
],
"_prefab": null,
......@@ -6241,47 +6269,114 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2eyal03X9Mp4FrqxkZCAVH"
"_id": "a9wdklmXxBOKLs40Y1V7l8"
},
{
"__type__": "cc.Widget",
"__type__": "cc.Node",
"_name": "gray",
"_objFlags": 0,
"_parent": {
"__id__": 124
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 126
}
],
"_prefab": null,
"_opacity": 150,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 50000,
"height": 50000
},
"_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": "0ebS036KRLVaosP+BVHHpL"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 125
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "9fr0grwX5J57n69Cqpwnin"
"_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": "83Qx3JumVOxJo6OtSAKfyK"
},
{
"__type__": "cc.Node",
"_name": "yourturn",
"_name": "voice_bg",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 124
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 127
"__id__": 128
}
],
"_prefab": null,
......@@ -6295,8 +6390,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 584,
"height": 235
"width": 440,
"height": 440
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6314,8 +6409,8 @@
0,
0,
1,
2,
2,
2.4,
2.4,
1
]
},
......@@ -6330,14 +6425,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "beNbXPSUZO3JERirbadq6E"
"_id": "03Fnn7m69PLoGF6lCYTK3a"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 126
"__id__": 127
},
"_enabled": true,
"_materials": [
......@@ -6348,7 +6443,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4baead75-5930-4efb-b75e-e9db88f4a9a1"
"__uuid__": "83b2a9f3-c0a8-41c0-8202-8ab7c35bfbe0"
},
"_type": 0,
"_sizeMode": 1,
......@@ -6362,35 +6457,30 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fc8448+HZJqqhlGZue2Lzm"
"_id": "d0iQkLfGVIdq3Ye4sGGL8b"
},
{
"__type__": "cc.Node",
"_name": "PlayerOffLineLayer",
"_name": "catBase",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 124
},
"_children": [
{
"__id__": 129
"__id__": 130
},
{
"__id__": 134
"__id__": 132
}
],
"_active": false,
"_components": [
{
"__id__": 147
},
{
"__id__": 148
"__id__": 134
}
],
"_prefab": {
"__id__": 149
},
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
......@@ -6413,15 +6503,15 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1280,
960,
-181.20500000000015,
92.846,
0,
0,
0,
0,
1,
1,
1,
1.3,
1.3,
1
]
},
......@@ -6436,43 +6526,35 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "72C22cBvpIHJeqbjpKzYUv"
"_id": "d1Q8ZMKadJIYUED5zEgHXq"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_name": "cat",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 129
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
},
{
"__id__": 131
},
{
"__id__": 132
}
],
"_prefab": {
"__id__": 133
},
"_opacity": 100,
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2560,
"height": 1920
"width": 362.6105263157899,
"height": 483.5647539622176
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6506,14 +6588,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e87Ggqo85HkoLdm5YqONNO"
"_id": "2aqxGu/dtG+LXCiCI1j14h"
},
{
"__type__": "cc.Sprite",
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 130
},
"_enabled": true,
"_materials": [
......@@ -6521,31 +6603,1134 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
"_armatureName": "Armature",
"_animationName": "normal",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "803a07bd-8d54-45a5-a888-f281c7dea819#8001c435-43bc-4830-9680-a63f39212777",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "803a07bd-8d54-45a5-a888-f281c7dea819"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"_N$dragonAtlasAsset": {
"__uuid__": "8001c435-43bc-4830-9680-a63f39212777"
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "eaVBC2+oNLK7smnTHCJQmm"
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 3,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "b4BpF8pIlGw5qjhZ8pWqwa"
},
{
"__type__": "cc.Widget",
"_name": "",
"__type__": "cc.Node",
"_name": "catBtn",
"_objFlags": 0,
"_parent": {
"__id__": 129
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 133
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 362,
"height": 483
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
890.79,
-519.093,
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": "784g/T+atIWouT9vESWt/t"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "d14XZg/DtMPrmVU7zs+X+s"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": -202.79499999999987,
"_top": 0,
"_bottom": -195.15400000000005,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "42DPDzHTpIeocwW/OJCO61"
},
{
"__type__": "cc.Node",
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 124
},
"_children": [],
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 500,
"height": 500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
16.055,
0,
0,
0,
0,
1,
2,
2,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "45PtCLQxBJe6mwtCkj+uSX"
},
{
"__type__": "cc.Node",
"_name": "progress",
"_objFlags": 0,
"_parent": {
"__id__": 124
},
"_children": [
{
"__id__": 137
}
],
"_active": false,
"_components": [
{
"__id__": 139
},
{
"__id__": 140
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 813,
"height": 51
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
808.73,
0,
0,
0,
0,
1,
2,
2,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "fbx3KFeN5LmYbSAZ9vDFdN"
},
{
"__type__": "cc.Node",
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 136
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 138
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 787,
"height": 29
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-393.381,
4.73,
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": "65suWvCwtAHrmAM9+wrP2V"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "e374f9a6-1bf3-42be-8356-98f1d58ad852"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "abdQOHS6ZIQrOp4fuR+sfd"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 136
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7eba1162-3304-4a71-8cd9-203a4da25bef"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "70PT8hLTBHbaVM7/7nvaSU"
},
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 136
},
"_enabled": true,
"_N$totalLength": 787,
"_N$barSprite": {
"__id__": 138
},
"_N$mode": 0,
"_N$progress": 1,
"_N$reverse": false,
"_id": "04JUkhcK5DpKUXHkeqkBlq"
},
{
"__type__": "cc.Node",
"_name": "bg_light",
"_objFlags": 0,
"_parent": {
"__id__": 124
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 142
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 615,
"height": 616
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
2,
2,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "22PxIxSEpMAJbtaFu6fhJ5"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "472f9171-b785-4580-83dd-aa8b1a16b910"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "81x3DL8xREWYv8NhYUoMBg"
},
{
"__type__": "cc.Node",
"_name": "good",
"_objFlags": 0,
"_parent": {
"__id__": 124
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 144
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1068,
"height": 416
},
"_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,
2
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "5aFvdsUJlLNpEZlhh67Z5P"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 143
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "90c9d15b-f8e8-4faf-b9af-8a0b8fd47ae9"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a1B76CN9xFTrgLoqotyAvE"
},
{
"__type__": "cc.Node",
"_name": "try",
"_objFlags": 0,
"_parent": {
"__id__": 124
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 146
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 534,
"height": 208
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
6.642,
0,
0,
0,
0,
1,
2,
2,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f680P6WAVNXI9RL1PolaP0"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4afa0360-f0c8-4621-b03e-380547a1544b"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "13huee2IlLqKvSAcV7YEdM"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "b7A1mgEXpMqqj1wUYy2ODR"
},
{
"__type__": "cc.Node",
"_name": "loadingLayerBase",
"_objFlags": 0,
"_parent": {
"__id__": 23
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 149
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2560,
"height": 1920
},
"_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": "2eyal03X9Mp4FrqxkZCAVH"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 148
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "9fr0grwX5J57n69Cqpwnin"
},
{
"__type__": "cc.Node",
"_name": "yourturn",
"_objFlags": 0,
"_parent": {
"__id__": 23
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 151
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 584,
"height": 235
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
2,
2,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "beNbXPSUZO3JERirbadq6E"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4baead75-5930-4efb-b75e-e9db88f4a9a1"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fc8448+HZJqqhlGZue2Lzm"
},
{
"__type__": "cc.Node",
"_name": "PlayerOffLineLayer",
"_objFlags": 0,
"_parent": {
"__id__": 23
},
"_children": [
{
"__id__": 153
},
{
"__id__": 158
}
],
"_active": false,
"_components": [
{
"__id__": 171
},
{
"__id__": 172
}
],
"_prefab": {
"__id__": 173
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2560,
"height": 1920
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1280,
960,
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": "72C22cBvpIHJeqbjpKzYUv"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 152
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 154
},
{
"__id__": 155
},
{
"__id__": 156
}
],
"_prefab": {
"__id__": 157
},
"_opacity": 100,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2560,
"height": 1920
},
"_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": "e87Ggqo85HkoLdm5YqONNO"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 153
},
"_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": "eaVBC2+oNLK7smnTHCJQmm"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 153
},
"_enabled": true,
"alignMode": 2,
......@@ -6572,7 +7757,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 153
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6638,7 +7823,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 128
"__id__": 152
},
"asset": {
"__uuid__": "359db7a9-6c66-4325-a51f-831118e6405f"
......@@ -6651,24 +7836,24 @@
"_name": "BtnFrame",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 152
},
"_children": [
{
"__id__": 135
"__id__": 159
},
{
"__id__": 140
"__id__": 164
}
],
"_active": true,
"_components": [
{
"__id__": 145
"__id__": 169
}
],
"_prefab": {
"__id__": 146
"__id__": 170
},
"_opacity": 255,
"_color": {
......@@ -6722,23 +7907,23 @@
"_name": "BtnExit",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 158
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 136
"__id__": 160
},
{
"__id__": 137
"__id__": 161
},
{
"__id__": 138
"__id__": 162
}
],
"_prefab": {
"__id__": 139
"__id__": 163
},
"_opacity": 255,
"_color": {
......@@ -6792,7 +7977,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 159
},
"_enabled": true,
"_materials": [
......@@ -6824,7 +8009,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 159
},
"_enabled": true,
"alignMode": 1,
......@@ -6851,7 +8036,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 159
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6917,7 +8102,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 128
"__id__": 152
},
"asset": {
"__uuid__": "359db7a9-6c66-4325-a51f-831118e6405f"
......@@ -6930,23 +8115,23 @@
"_name": "BtnPlayAgain",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 158
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 141
"__id__": 165
},
{
"__id__": 142
"__id__": 166
},
{
"__id__": 143
"__id__": 167
}
],
"_prefab": {
"__id__": 144
"__id__": 168
},
"_opacity": 255,
"_color": {
......@@ -7000,7 +8185,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 164
},
"_enabled": true,
"_materials": [
......@@ -7032,7 +8217,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 164
},
"_enabled": true,
"alignMode": 1,
......@@ -7059,7 +8244,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 164
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7125,7 +8310,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 128
"__id__": 152
},
"asset": {
"__uuid__": "359db7a9-6c66-4325-a51f-831118e6405f"
......@@ -7138,7 +8323,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 134
"__id__": 158
},
"_enabled": true,
"_materials": [
......@@ -7168,7 +8353,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 128
"__id__": 152
},
"asset": {
"__uuid__": "359db7a9-6c66-4325-a51f-831118e6405f"
......@@ -7181,7 +8366,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 128
"__id__": 152
},
"_enabled": true,
"alignMode": 2,
......@@ -7208,7 +8393,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 128
"__id__": 152
},
"_enabled": true,
"_id": "f1HtC+YZ9Jq7qaM4EidkGP"
......@@ -7216,7 +8401,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 128
"__id__": 152
},
"asset": {
"__uuid__": "359db7a9-6c66-4325-a51f-831118e6405f"
......@@ -7260,19 +8445,19 @@
},
"_children": [
{
"__id__": 152
"__id__": 176
},
{
"__id__": 155
"__id__": 179
}
],
"_active": false,
"_components": [
{
"__id__": 164
"__id__": 188
},
{
"__id__": 165
"__id__": 189
}
],
"_prefab": null,
......@@ -7328,16 +8513,16 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 151
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 153
"__id__": 177
},
{
"__id__": 154
"__id__": 178
}
],
"_prefab": null,
......@@ -7393,7 +8578,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 152
"__id__": 176
},
"_enabled": true,
"_materials": [
......@@ -7425,7 +8610,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 152
"__id__": 176
},
"_enabled": true,
"alignMode": 2,
......@@ -7452,23 +8637,23 @@
"_name": "labelBg",
"_objFlags": 0,
"_parent": {
"__id__": 151
"__id__": 175
},
"_children": [
{
"__id__": 156
"__id__": 180
},
{
"__id__": 159
"__id__": 183
}
],
"_active": true,
"_components": [
{
"__id__": 162
"__id__": 186
},
{
"__id__": 163
"__id__": 187
}
],
"_prefab": null,
......@@ -7524,16 +8709,16 @@
"_name": "labelLoss",
"_objFlags": 0,
"_parent": {
"__id__": 155
"__id__": 179
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 157
"__id__": 181
},
{
"__id__": 158
"__id__": 182
}
],
"_prefab": null,
......@@ -7589,7 +8774,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 180
},
"_enabled": true,
"_materials": [
......@@ -7621,7 +8806,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 180
},
"_enabled": true,
"alignMode": 1,
......@@ -7648,16 +8833,16 @@
"_name": "labelWin",
"_objFlags": 0,
"_parent": {
"__id__": 155
"__id__": 179
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 160
"__id__": 184
},
{
"__id__": 161
"__id__": 185
}
],
"_prefab": null,
......@@ -7713,7 +8898,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 159
"__id__": 183
},
"_enabled": true,
"_materials": [
......@@ -7745,7 +8930,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 159
"__id__": 183
},
"_enabled": true,
"alignMode": 1,
......@@ -7772,7 +8957,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 155
"__id__": 179
},
"_enabled": true,
"_materials": [
......@@ -7804,7 +8989,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 155
"__id__": 179
},
"_enabled": true,
"alignMode": 2,
......@@ -7831,7 +9016,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
"__id__": 175
},
"_enabled": true,
"alignMode": 2,
......@@ -7858,7 +9043,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
"__id__": 175
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7987,22 +9172,22 @@
},
"_children": [
{
"__id__": 170
"__id__": 194
},
{
"__id__": 172
"__id__": 196
},
{
"__id__": 174
"__id__": 198
},
{
"__id__": 176
"__id__": 200
},
{
"__id__": 178
"__id__": 202
},
{
"__id__": 180
"__id__": 204
}
],
"_active": true,
......@@ -8060,13 +9245,13 @@
"_name": "落子",
"_objFlags": 0,
"_parent": {
"__id__": 169
"__id__": 193
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 171
"__id__": 195
}
],
"_prefab": null,
......@@ -8122,7 +9307,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 170
"__id__": 194
},
"_enabled": true,
"_clip": {
......@@ -8141,13 +9326,13 @@
"_name": "正确",
"_objFlags": 0,
"_parent": {
"__id__": 169
"__id__": 193
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 173
"__id__": 197
}
],
"_prefab": null,
......@@ -8203,7 +9388,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 172
"__id__": 196
},
"_enabled": true,
"_clip": {
......@@ -8222,13 +9407,13 @@
"_name": "失败",
"_objFlags": 0,
"_parent": {
"__id__": 169
"__id__": 193
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 175
"__id__": 199
}
],
"_prefab": null,
......@@ -8284,7 +9469,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 174
"__id__": 198
},
"_enabled": true,
"_clip": {
......@@ -8303,13 +9488,13 @@
"_name": "错误弹回",
"_objFlags": 0,
"_parent": {
"__id__": 169
"__id__": 193
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 177
"__id__": 201
}
],
"_prefab": null,
......@@ -8365,7 +9550,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 176
"__id__": 200
},
"_enabled": true,
"_clip": {
......@@ -8384,13 +9569,13 @@
"_name": "进度条升高",
"_objFlags": 0,
"_parent": {
"__id__": 169
"__id__": 193
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 179
"__id__": 203
}
],
"_prefab": null,
......@@ -8446,7 +9631,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 178
"__id__": 202
},
"_enabled": true,
"_clip": {
......@@ -8465,13 +9650,13 @@
"_name": "胜利",
"_objFlags": 0,
"_parent": {
"__id__": 169
"__id__": 193
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 181
"__id__": 205
}
],
"_prefab": null,
......@@ -8527,7 +9712,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 180
"__id__": 204
},
"_enabled": true,
"_clip": {
......@@ -8550,10 +9735,10 @@
},
"_children": [
{
"__id__": 183
"__id__": 207
},
{
"__id__": 185
"__id__": 209
}
],
"_active": true,
......@@ -8611,13 +9796,13 @@
"_name": "light",
"_objFlags": 0,
"_parent": {
"__id__": 182
"__id__": 206
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 184
"__id__": 208
}
],
"_prefab": null,
......@@ -8673,7 +9858,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 183
"__id__": 207
},
"_enabled": true,
"_materials": [
......@@ -8705,13 +9890,13 @@
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 182
"__id__": 206
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 186
"__id__": 210
}
],
"_prefab": null,
......@@ -8767,7 +9952,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 209
},
"_enabled": true,
"_materials": [
......
......@@ -9,6 +9,8 @@ import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
import { NetworkHelper } from "../script/NetworkHelper";
import { GameServer } from "../script/Server";
let win: any = window;
let courseware = win.courseware;
const { ccclass, property } = cc._decorator;
@ccclass
......@@ -103,6 +105,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
initView() {
this.hideVoice();
this.initBg();
this.initLoadingLayer();
this.initPiece();
......@@ -246,9 +249,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
initListener() {
const btn = cc.find("Canvas/bg/New Button");
btn.on("click", async () => {
const idx = RandomInt(6);
await this.rollTheDice(idx);
this._status.letter = ["G", "H", "I", "J", "K", "L"][idx];
// const idx = RandomInt(6);
// await this.rollTheDice(idx);
// this._status.letter = ["1", "2", "3", "1", "2", "3"][idx];
// //执行位移
});
const dice = cc.find("Canvas/bg/chessBoard/diceBg/dice");
......@@ -451,26 +455,27 @@ export default class SceneComponent extends MyCocosSceneComponent {
rollPiece(node: cc.Node) {
node.stopAllActions();
cc.tween(node)
.set({ scale: 1, angle: 0 })
.to(0.1, { angle: -10 })
.to(0.2, { angle: 10 })
.to(0.1, { angle: 0 })
.delay(1)
.union()
.repeatForever()
.start();
const board = cc.find("Canvas/bg/chessBoard/boardItems");
board.children.forEach((child: cc.Node, idx, list) => {
cc.tween(child)
.set({ scale: 1.34 })
.delay(idx * 0.1)
.to(0.1, { scale: 1.5 })
.to(0.1, { scale: 1.34 })
.delay(list.length * 0.2 - idx * 0.2)
.start();
});
// cc.tween(node)
// .set({ scale: 1, angle: 0 })
// .to(0.1, { angle: -10 })
// .to(0.2, { angle: 10 })
// .to(0.1, { angle: 0 })
// .delay(1)
// .union()
// .repeatForever()
// .start();
//子节点放大效果
// const board = cc.find("Canvas/bg/chessBoard/boardItems");
// board.children.forEach((child: cc.Node, idx, list) => {
// cc.tween(child)
// .set({ scale: 1.34 })
// .delay(idx * 0.1)
// .to(0.1, { scale: 1.5 })
// .to(0.1, { scale: 1.34 })
// .delay(list.length * 0.2 - idx * 0.2)
// .start();
// });
}
stopRollPiece(node) {
node.scale = 1;
......@@ -490,7 +495,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
getRightBlock() {
const board = cc.find("Canvas/bg/chessBoard/boardItems");
const startIdx = this._status[this._status.current];
console.log("startIdx = " + JSON.stringify(startIdx));
// console.log("startIdx = " + JSON.stringify(startIdx));
for (let i = startIdx + 1; i < board.children.length; i++) {
const targetNode = board.children[i];
const itemData = targetNode.getComponent("BoardGame2_ItemData");
......@@ -587,7 +592,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let targetHeight =
(idx / (board.children.length - 2)) * prograssbar.height;
console.log(idx + "_进度条高:" + targetHeight);
// console.log(idx + "_进度条高:" + targetHeight);
const offsetX = { Red: -45, Blue: 45 };
const offsetY = { Red: -90, Blue: -90 };
......@@ -644,7 +649,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log(status);
this._status = JSON.parse(JSON.stringify(status));
} else {
console.log("喵喵喵");
// console.log("喵喵喵");
}
const playerMe = this.allPlayerList.find(
(player) => player.uuid == this.playerId
......@@ -696,10 +701,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
changeSide() {
if (this._status.current == "Red") {
this._status.current = "Blue";
console.log("changeSide Blue");
// console.log("changeSide Blue");
} else {
this._status.current = "Red";
console.log("changeSide Red");
// console.log("changeSide Red");
}
}
......@@ -735,6 +740,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.stopAllActions();
}
getLetterList() {
const board = cc.find("Canvas/bg/chessBoard/boardItems");
const startIdx = this._status[this._status.current];
const letterList = [];
for (let i = startIdx + 1; i < board.children.length - 1; i++) {
const targetNode = board.children[i];
const itemData = targetNode.getComponent("BoardGame2_ItemData");
const nodeLetter = itemData.letter.toUpperCase();
if (!letterList.find((letter) => letter == nodeLetter)) {
letterList.push(nodeLetter);
}
}
return letterList;
}
allPlayerList;
initNetworkListener() {
this.networkHelper.on("playerJoin", (event) => {
......@@ -792,41 +812,89 @@ export default class SceneComponent extends MyCocosSceneComponent {
);
});
} else if (item.data.type == "SERVER_updateStatus") {
//TODO:调试加速2 默认 3
await asyncDelay(3);
console.log(
"SERVER_updateStatus: " + JSON.stringify(item.data.status)
);
this.updateStatus(item.data.status);
} else if (item.data.type == "SERVER_playerRoll") {
console.log("SERVER_playerRoll: " + JSON.stringify(item.data));
// console.log("SERVER_playerRoll: " + JSON.stringify(item.data));
const status = this._status;
status.letter = item.data.letter;
console.log("status.letter = " + status.letter);
console.log("item.data.letter = " + item.data.letter);
const idx = ["G", "H", "I", "J", "K", "L"].findIndex(
(letter) => letter == status.letter
);
// console.log("item.data.letter = " + item.data.letter);
//根据当前startIdx和下一步的letter位置找 idx
let letterList = this.getLetterList();
let idx = letterList.findIndex(letter => letter == status.letter);
if (idx == -1) {
console.log("error")
}
const startIdx = this._status[this._status.current];
let nextIdx = startIdx + idx + 1;
// const idx = ["G", "H", "I", "J", "K", "L"].findIndex(
// (letter) => letter == status.letter
// );
const pieceRed = cc.find("Canvas/bg/chessBoard/pieceRed");
const pieceBlue = cc.find("Canvas/bg/chessBoard/pieceBlue");
pieceRed["cantMove"] = true;
pieceBlue["cantMove"] = true;
this.stopBlinkTheDice();
console.log("status1 = " + JSON.stringify(status));
// console.log("status1 = " + JSON.stringify(status));
await this.rollTheDice(idx);
pieceRed["cantMove"] = false;
pieceBlue["cantMove"] = false;
console.log("status2 = " + JSON.stringify(status));
console.log("this._status = " + JSON.stringify(this._status));
// console.log("status2 = " + JSON.stringify(status));
// console.log("this._status = " + JSON.stringify(this._status));
this.updateStatus(status);
console.log("status = " + JSON.stringify(status));
console.log("this._status = " + JSON.stringify(this._status));
// console.log("status = " + JSON.stringify(status));
// console.log("this._status = " + JSON.stringify(this._status));
// const idx = this.getNextRightIdx();
const playerMe = this.allPlayerList.find((player) => player.uuid == this.playerId);
// console.log("idx->" + idx);
if (this._status.current == playerMe.color) {
let rightBlock = this.getRightBlock();
let idx = this.getNextRightIdx();
const pieceRed = cc.find("Canvas/bg/chessBoard/pieceRed");
const pieceBlue = cc.find("Canvas/bg/chessBoard/pieceBlue");
pieceRed["cantMove"] = false;
pieceBlue["cantMove"] = false;
await this.pieceFindRightBlock(rightBlock, idx);
pieceRed["cantMove"] = true;
pieceBlue["cantMove"] = true;
let isSuccess = await this.showVoice(rightBlock);
this.hideVoice();
if (isSuccess) {
this.networkHelper.sendFrame({
type: "right",
idx: nextIdx,
uuid: playerMe.uuid,
color: playerMe.color,
});
} else {
this.networkHelper.sendFrame({
type: "wrong",
uuid: playerMe.uuid,
color: playerMe.color,
});
}
}
} else if (item.data.type == "SERVER_playerRight") {
console.log("SERVER_playerRight: " + JSON.stringify(item.data));
console.log("this._status = " + JSON.stringify(this._status));
const playerMe = this.allPlayerList.find((player) => player.uuid == this.playerId);
if (this._status.current == playerMe.color) {
this._status.letter = "";
this.changeSide();
this.updateStatus();
return;
}
// console.log("SERVER_playerRight: " + JSON.stringify(item.data));
// console.log("this._status = " + JSON.stringify(this._status));
let rightBlock = this.getRightBlock();
console.log(rightBlock);
// console.log(rightBlock);
let idx = this.getNextRightIdx();
console.log(idx);
// console.log("targetIdx->" + idx);
const pieceRed = cc.find("Canvas/bg/chessBoard/pieceRed");
const pieceBlue = cc.find("Canvas/bg/chessBoard/pieceBlue");
pieceRed["cantMove"] = false;
......@@ -889,6 +957,253 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
}
showVoice(node: cc.Node) {
return new Promise((resolve, reject) => {
let voice = cc.find("Canvas/bg/voice");
voice.active = true;
let gray = voice.getChildByName("gray");
let catBase = voice.getChildByName("catBase");
let img = voice.getChildByName("img");
let progress = voice.getChildByName("progress");
let imgLight = voice.getChildByName("bg_light");
let imgGood = voice.getChildByName("good");
let imgTry = voice.getChildByName("try");
progress.active = true;
img.active = true;
imgLight.active = false;
imgGood.active = false;
imgTry.active = false;
//img需要clone对应的节点塞进去。
img.removeAllChildren();
let cloneNode = cc.instantiate(node);
cloneNode.x = 0;
cloneNode.y = 0;
img.addChild(cloneNode);
let progressBar = progress.getComponent(cc.ProgressBar)
progressBar.progress = 1;
cc.tween(progressBar).delay(1).to(3, { progress: 0 }).call(() => {
}).start();
console.log('startTest->' + this._status.letter);
courseware && courseware.startTest(this._status.letter); //开始录音
setTimeout(async () => {
let testData = {
"dtLastResponse": "2021-09-17 13:36:26:109",
"refText": "I haven't found anything out about him yet.",
"recordId": "6144295213f0a2200000ed93",
"eof": 1,
"result": {
"pronunciation": 25,
"resource_version": "3.1.0",
"fluency": 60,
"rhythm": 90,
"kernel_version": "5.2.4",
"overall": 25,//75
"integrity": 100,
"duration": "6.779",
"rear_tone": "fall",
"speed": 96,
"words": [
{
"phonemes": [
{
"phoneme": "w",
"pronunciation": 55,
"span": {
"end": 95,
"start": 88
}
},
{
"phoneme": "ɛ",
"pronunciation": 100,
"span": {
"end": 107,
"start": 95
}
},
{
"phoneme": "r",
"pronunciation": 99,
"span": {
"end": 123,
"start": 107
}
}
],
"phonics": [
{
"overall": 85,
"phoneme": [
"w",
"ɛ",
"r"
],
"spell": "Where"
}
],
"scores": {
"overall": 80,
"pronunciation": 92
},
"span": {
"end": 123,
"start": 88
},
"word": "Where"
}, {
"phonemes": [
{
"phoneme": "w",
"pronunciation": 55,
"span": {
"end": 95,
"start": 88
}
},
{
"phoneme": "ɛ",
"pronunciation": 100,
"span": {
"end": 107,
"start": 95
}
},
{
"phoneme": "r",
"pronunciation": 99,
"span": {
"end": 123,
"start": 107
}
}
],
"phonics": [
{
"overall": 85,
"phoneme": [
"w",
"ɛ",
"r"
],
"spell": "Where"
}
],
"scores": {
"overall": 10,
"pronunciation": 92
},
"span": {
"end": 123,
"start": 88
},
"word": "Where"
}
]
},
"tokenId": "6144295408558b08dd000001",
"applicationId": "154838659000009e"
}
if (!courseware) {
if (this.recrodEnd(testData)) {
await this.showVoiceGood();
return resolve(true)
} else {
await this.showVoiceTry();
return resolve(false);
}
}
// await pg.time.delay(5);
courseware && courseware.stopTest(async (data) => {
data = JSON.parse(data);
if (this.recrodEnd(data)) {
await this.showVoiceGood();
return resolve(true)
} else {
await this.showVoiceTry();
return resolve(false);
}
}); //结束录音
}, 4000);
});
}
showVoiceGood() {
return new Promise((resolve, reject) => {
let voice = cc.find("Canvas/bg/voice");
voice.active = true;
let imgLight = voice.getChildByName("bg_light");
let imgGood = voice.getChildByName("good");
let imgTry = voice.getChildByName("try");
imgLight.active = true;
cc.Tween.stopAllByTarget(imgLight);
cc.tween(imgLight)
.by(3, { angle: 360 })
.repeatForever()
.start();
imgGood.active = true;
imgTry.active = false;
setTimeout(() => {
resolve('');
}, 2000);
});
}
showVoiceTry() {
return new Promise((resolve, reject) => {
let voice = cc.find("Canvas/bg/voice");
voice.active = true;
let imgLight = voice.getChildByName("bg_light");
let imgGood = voice.getChildByName("good");
let imgTry = voice.getChildByName("try");
imgLight.active = true;
cc.Tween.stopAllByTarget(imgLight);
cc.tween(imgLight)
.by(3, { angle: 360 })
.repeatForever()
.start();
imgGood.active = false;
imgTry.active = true;
setTimeout(() => {
resolve('');
}, 2000);
});
}
async recrodEnd(data) {
return true;
let score = data.result.overall;
let isSuccess = this.checkWords(data);
if (score >= 70 && isSuccess) {
//提示成功
return true;
} else {
return false;
}
}
private checkWords(data) {
const sentences = data.result.sentences;
for (let i = 0; i < sentences.length; i++) {
const details = sentences[i].details;
const isSuccess = details.some(item => item.overall <= 40);
if (isSuccess) {
return false;
}
}
return true;
}
hideVoice() {
let voice = cc.find("Canvas/bg/voice");
voice.active = false;
}
showWin() {
cc.find("Canvas/endBg").active = true;
const bg = cc.find("Canvas/endBg/bg");
......@@ -995,6 +1310,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
resolve(null);
})
.start();
//TODO:调试加速
// cc.tween(dice)
// .by(0.3, { angle: 360 }, { easing: "cubicIn" })
// .to(time, { angle: targetAngle })
// .by(0.1, { angle: 360 })
// .by(0.1, { angle: 360 })
// .by(0.1, { angle: 360 })
// .by(0.1, { angle: 360 })
// .by((1 / 6) * num, { angle: 60 * num })
// .by(0.3, { angle: 360 }, { easing: "cubicOut" })
// .call(() => {
// dice["cantRoll"] = false;
// resolve(null);
// })
// .start();
});
}
......
......@@ -21,15 +21,16 @@ export class AI {
if (event.type == "SERVER_updateStatus") {
this._status = JSON.parse(JSON.stringify(event.status));
} else if (event.type == "SERVER_playerRoll") {
//玩家需要转盘,待转完之后 进行后续动作
this._status.letter = event.letter;
if (this.playerData.color == this._status.current) {
// await asyncDelay(Math.random() * 3 + 12);
await asyncDelay(15);
//TODO:正常8 调试加速 减少AI等待时间
await asyncDelay(4);
}
} else if (event.type == "SERVER_playerRight") {
this._status.letter = "";
this._status[event.color] = event.idx;
this.changeSide();
} else if (event.type == "SERVER_playerWrong") {
this._status.letter = "";
......@@ -37,29 +38,23 @@ export class AI {
}
if (this.playerData.color == this._status.current) {
await asyncDelay(Math.random() * 3 + 4);
if (this._status.letter == "") {
//TODO:调试加速 2 Math.random() * 3 + 2
await asyncDelay(Math.random() * 3 + 2);
this.networkHelper.sendFrame({
type: "roll",
uuid: this.playerData.uuid,
});
} else {
//调试加速 2 Math.random() * 3 + 4
await asyncDelay(Math.random() * 3 + 4);
const idx = this.getNextRightIdx();
if (Math.random() < 0.9) {
this.networkHelper.sendFrame({
type: "right",
idx: idx,
uuid: this.playerData.uuid,
color: this.playerData.color,
});
} else {
this.networkHelper.sendFrame({
type: "wrong",
uuid: this.playerData.uuid,
color: this.playerData.color,
});
}
this.networkHelper.sendFrame({
type: "right",
idx: idx,
uuid: this.playerData.uuid,
color: this.playerData.color,
});
}
}
}
......
......@@ -113,7 +113,8 @@ export class GameServer {
this._aiPlayerList.push(new AI(this.networkHelper, playerInfo));
this.addPlayer(playerInfo);
}
}, RandomInt(10000, 15000))
//TODO:调试加速
}, 1000)//RandomInt(10000, 15000)
);
}
}
......@@ -127,7 +128,12 @@ export class GameServer {
console.log('letterList: ', letterList);
if (letterList.length > 0) {
if (this.gameStatus.letter == "") {
const letter = letterList[RandomInt(letterList.length)];
// let max = Math.max(letterList.length - 2, 0);
// let letter = letterList[max];//[RandomInt(letterList.length) % 3];//转盘只有1-3
// if (this.gameStatus.current != 'Blue') {
// letter = letterList[0]
// }
let letter = letterList[RandomInt(letterList.length) % 3];
this.gameStatus.letter = letter;
this.networkHelper.sendFrame({
type: "SERVER_playerRoll",
......@@ -164,7 +170,7 @@ export class GameServer {
this.gameStatus[data.color] = data.idx;
const jump = this.jumpList.find(jump => parseInt(jump.from) == parseInt(data.idx));
const letterList = this.getLetterList();
console.log("letterList = " + JSON.stringify(letterList));
// console.log("letterList = " + JSON.stringify(letterList));
if (letterList.length > 0) {
if (jump) {
this.gameStatus[data.color] = parseInt(jump.to);
......@@ -210,10 +216,10 @@ export class GameServer {
getLetterList() {
const board = cc.find("Canvas/bg/chessBoard/boardItems");
const color = this.gameStatus.current;
console.log("color = " + color);
console.log("this.gameStatus = " + JSON.stringify(this.gameStatus));
// console.log("color = " + color);
// console.log("this.gameStatus = " + JSON.stringify(this.gameStatus));
const startIdx = this.gameStatus[color];
console.log("startIdx = " + startIdx);
// console.log("startIdx = " + startIdx);
const letterList = [];
for (let i = startIdx + 1; i < board.children.length - 1; i++) {
......
assets/BoardGame2/textures/dice.png

111 KB | W: | H:

assets/BoardGame2/textures/dice.png

149 KB | W: | H:

assets/BoardGame2/textures/dice.png
assets/BoardGame2/textures/dice.png
assets/BoardGame2/textures/dice.png
assets/BoardGame2/textures/dice.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 483,
"height": 483,
"width": 450,
"height": 452,
"platformSettings": {},
"subMetas": {
"dice": {
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 457,
"height": 455,
"rawWidth": 457,
"rawHeight": 455,
"width": 450,
"height": 452,
"rawWidth": 450,
"rawHeight": 452,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "1.1.2",
"uuid": "3ed49fb7-ac97-4b54-9058-af3ec40bfac0",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "0ae07756-57b0-4bc3-bcf8-d91a4253cfea",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1068,
"height": 416,
"platformSettings": {},
"subMetas": {
"bg_good-job": {
"ver": "1.0.4",
"uuid": "90c9d15b-f8e8-4faf-b9af-8a0b8fd47ae9",
"rawTextureUuid": "0ae07756-57b0-4bc3-bcf8-d91a4253cfea",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1068,
"height": 416,
"rawWidth": 1068,
"rawHeight": 416,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "108abd9f-2004-4f49-bf3a-ba602723b04c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 623,
"height": 617,
"platformSettings": {},
"subMetas": {
"bg_light": {
"ver": "1.0.4",
"uuid": "472f9171-b785-4580-83dd-aa8b1a16b910",
"rawTextureUuid": "108abd9f-2004-4f49-bf3a-ba602723b04c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 4,
"trimY": 0,
"width": 615,
"height": 616,
"rawWidth": 623,
"rawHeight": 617,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dd02cfee-d5fc-40ac-998c-3b57972284f8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 534,
"height": 208,
"platformSettings": {},
"subMetas": {
"bg_nice-try": {
"ver": "1.0.4",
"uuid": "4afa0360-f0c8-4621-b03e-380547a1544b",
"rawTextureUuid": "dd02cfee-d5fc-40ac-998c-3b57972284f8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 534,
"height": 208,
"rawWidth": 534,
"rawHeight": 208,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5dc663fd-973c-434c-a5b0-88a6191e4b35",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 813,
"height": 51,
"platformSettings": {},
"subMetas": {
"progress_0": {
"ver": "1.0.4",
"uuid": "7eba1162-3304-4a71-8cd9-203a4da25bef",
"rawTextureUuid": "5dc663fd-973c-434c-a5b0-88a6191e4b35",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 813,
"height": 51,
"rawWidth": 813,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "66e25578-813b-43fa-a111-89148badfb16",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 813,
"height": 51,
"platformSettings": {},
"subMetas": {
"progress_1": {
"ver": "1.0.4",
"uuid": "e374f9a6-1bf3-42be-8356-98f1d58ad852",
"rawTextureUuid": "66e25578-813b-43fa-a111-89148badfb16",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 5,
"trimX": 12,
"trimY": 5,
"width": 789,
"height": 31,
"rawWidth": 813,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 38,
"borderRight": 16,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3e664f49-4d71-4a55-9a1c-68ca5f5f18ef",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 960,
"platformSettings": {},
"subMetas": {
"view_voice": {
"ver": "1.0.4",
"uuid": "b9852ca1-785e-4373-a4f6-e6af46976053",
"rawTextureUuid": "3e664f49-4d71-4a55-9a1c-68ca5f5f18ef",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 960,
"rawWidth": 1280,
"rawHeight": 960,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "313a7446-e6fb-4d05-a1c6-ad2f36466432",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 440,
"height": 440,
"platformSettings": {},
"subMetas": {
"voice_bg": {
"ver": "1.0.4",
"uuid": "83b2a9f3-c0a8-41c0-8202-8ab7c35bfbe0",
"rawTextureUuid": "313a7446-e6fb-4d05-a1c6-ad2f36466432",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 440,
"height": 440,
"rawWidth": 440,
"rawHeight": 440,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment