Enhanced pre-battle start GUI.

This commit is contained in:
genxium 2023-02-13 10:34:56 +08:00
parent 2751569e0c
commit 62c51b1838
12 changed files with 528 additions and 222 deletions

View File

@ -25,19 +25,22 @@
},
{
"__id__": 68
},
{
"__id__": 76
}
],
"_active": true,
"_components": [
{
"__id__": 76
"__id__": 79
},
{
"__id__": 77
"__id__": 80
}
],
"_prefab": {
"__id__": 78
"__id__": 81
},
"_opacity": 255,
"_color": {
@ -2899,6 +2902,115 @@
"fileId": "c54lqSflFD8ogSYAhsAkKh",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "Loading",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 77
}
],
"_prefab": {
"__id__": 78
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 42,
"height": 46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-206.37,
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__": 76
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "350fd890-3d28-4e53-9dfa-1bf00d857737"
},
"_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__": "32b8e752-8362-4783-a4a6-1160af8b7109"
},
"fileId": "8d0LdBGuhBm5FVth4Dua8p",
"sync": false
},
{
"__type__": "dd92bKVy8FJY7uq3ieoNZCZ",
"_name": "",
@ -2923,6 +3035,9 @@
}
],
"chosenSpeciesId": 0,
"loadingNode": {
"__id__": 76
},
"_id": ""
},
{

View File

@ -88,7 +88,7 @@
"__id__": 1
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 3

View File

@ -77,12 +77,6 @@
],
"_active": true,
"_components": [
{
"__id__": 49
},
{
"__id__": 50
},
{
"__id__": 51
},
@ -91,6 +85,12 @@
},
{
"__id__": 53
},
{
"__id__": 54
},
{
"__id__": 55
}
],
"_prefab": null,
@ -244,10 +244,10 @@
"__uuid__": "670b477e-61a1-4778-879b-35913f7c79d2"
},
"boundRoomIdLabel": {
"__id__": 26
"__id__": 28
},
"countdownLabel": {
"__id__": 33
"__id__": 35
},
"resultPanelPrefab": {
"__uuid__": "c4cfe3bd-c59e-4d5b-95cb-c933b120e184"
@ -261,26 +261,26 @@
"countdownToBeginGamePrefab": {
"__uuid__": "230eeb1f-e0f9-4a41-ab6c-05b3771cbf3e"
},
"playersInfoPrefab": {
"__uuid__": "b4e519f4-e698-4403-9ff2-47b8dacb077e"
},
"forceBigEndianFloatingNumDecoding": false,
"renderFrameIdLagTolerance": 4,
"sendingQLabel": {
"inputFrameFrontLabel": {
"__id__": 13
},
"inputFrameDownsyncQLabel": {
"sendingQLabel": {
"__id__": 15
},
"peerInputFrameUpsyncQLabel": {
"inputFrameDownsyncQLabel": {
"__id__": 17
},
"rollbackFramesLabel": {
"peerInputFrameUpsyncQLabel": {
"__id__": 19
},
"skippedRenderFrameCntLabel": {
"rollbackFramesLabel": {
"__id__": 21
},
"skippedRenderFrameCntLabel": {
"__id__": 23
},
"_id": "d12gkAmppNlIzqcRDELa91"
},
{
@ -292,13 +292,13 @@
},
"_children": [
{
"__id__": 43
"__id__": 45
}
],
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
@ -360,20 +360,20 @@
{
"__id__": 6
},
{
"__id__": 32
},
{
"__id__": 34
},
{
"__id__": 38
"__id__": 36
},
{
"__id__": 40
}
],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 44
}
],
"_prefab": null,
@ -442,7 +442,7 @@
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 33
}
],
"_prefab": null,
@ -536,7 +536,7 @@
"array": [
0,
0,
216.50635094610968,
216.65450766436658,
0,
0,
0,
@ -620,15 +620,18 @@
},
{
"__id__": 22
},
{
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 29
"__id__": 31
},
{
"__id__": 30
"__id__": 32
}
],
"_prefab": null,
@ -681,7 +684,7 @@
},
{
"__type__": "cc.Node",
"_name": "sendingQ",
"_name": "inputFrameFront",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -739,7 +742,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "ack7XH+0lEj6chSUsKBLU5"
"_id": "83n6IAj9tAkop6CA/MyM0A"
},
{
"__type__": "cc.Label",
@ -771,11 +774,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "deCJfLuoFO36c/O4lXWJ1N"
"_id": "a4CfeVmexNm7nULcCRHcVl"
},
{
"__type__": "cc.Node",
"_name": "inputFrameDownsyncQ",
"_name": "sendingQ",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -833,7 +836,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d9n+NRm9pA0YtKxvy4bW+U"
"_id": "ack7XH+0lEj6chSUsKBLU5"
},
{
"__type__": "cc.Label",
@ -865,11 +868,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "90NvjGFrpBFqqzl1WZczta"
"_id": "deCJfLuoFO36c/O4lXWJ1N"
},
{
"__type__": "cc.Node",
"_name": "peerInputFrameUpsyncQ",
"_name": "inputFrameDownsyncQ",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -927,7 +930,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "45FAmgRLZNNbLt/GcnTXVx"
"_id": "d9n+NRm9pA0YtKxvy4bW+U"
},
{
"__type__": "cc.Label",
@ -959,11 +962,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "42PRTrjEpDw6Z8N5yWFTpd"
"_id": "90NvjGFrpBFqqzl1WZczta"
},
{
"__type__": "cc.Node",
"_name": "rollbackFrames",
"_name": "peerInputFrameUpsyncQ",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -1021,7 +1024,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "f5SBs3b1pPNbHbnqVLYsHp"
"_id": "45FAmgRLZNNbLt/GcnTXVx"
},
{
"__type__": "cc.Label",
@ -1053,11 +1056,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "77aNARt1VATLsjIzwbqvkh"
"_id": "42PRTrjEpDw6Z8N5yWFTpd"
},
{
"__type__": "cc.Node",
"_name": "skippedCnt",
"_name": "rollbackFrames",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -1073,9 +1076,9 @@
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 243,
"g": 225,
"b": 11,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
@ -1115,7 +1118,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cdlF8Z8TZEdLRHQQ8T8qX7"
"_id": "f5SBs3b1pPNbHbnqVLYsHp"
},
{
"__type__": "cc.Label",
@ -1147,6 +1150,100 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "77aNARt1VATLsjIzwbqvkh"
},
{
"__type__": "cc.Node",
"_name": "skippedCnt",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 243,
"g": 225,
"b": 11,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 18.33,
"height": 22.61
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-24.355000000000018,
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": "cdlF8Z8TZEdLRHQQ8T8qX7"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "0",
"_N$string": "0",
"_fontSize": 22,
"_lineHeight": 37,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "a564b3db-b8cb-48b4-952e-25bb56949116"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "2flWrlaK1PeJMUB/in+S1W"
},
{
@ -1158,19 +1255,19 @@
},
"_children": [
{
"__id__": 23
"__id__": 25
},
{
"__id__": 25
"__id__": 27
}
],
"_active": false,
"_components": [
{
"__id__": 27
"__id__": 29
},
{
"__id__": 28
"__id__": 30
}
],
"_prefab": null,
@ -1226,13 +1323,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 24
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 26
}
],
"_prefab": null,
@ -1288,7 +1385,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 25
},
"_enabled": true,
"_materials": [],
@ -1316,13 +1413,13 @@
"_name": "BoundRoomIdLabel",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 24
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 28
}
],
"_prefab": null,
@ -1378,7 +1475,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
"__id__": 27
},
"_enabled": true,
"_materials": [],
@ -1406,7 +1503,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 24
},
"_enabled": true,
"_layoutSize": {
@ -1439,7 +1536,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 24
},
"_enabled": true,
"_materials": [],
@ -1561,7 +1658,7 @@
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 35
}
],
"_prefab": null,
@ -1617,7 +1714,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 34
},
"_enabled": true,
"_materials": [
@ -1651,7 +1748,7 @@
},
"_children": [
{
"__id__": 35
"__id__": 37
}
],
"_active": true,
@ -1709,16 +1806,16 @@
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 38
},
{
"__id__": 37
"__id__": 39
}
],
"_prefab": null,
@ -1774,7 +1871,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"_materials": [
@ -1808,7 +1905,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"alignMode": 0,
@ -1839,7 +1936,7 @@
},
"_children": [
{
"__id__": 39
"__id__": 41
}
],
"_active": true,
@ -1897,16 +1994,16 @@
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 40
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 42
},
{
"__id__": 41
"__id__": 43
}
],
"_prefab": null,
@ -1962,7 +2059,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"_materials": [
@ -1996,7 +2093,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"alignMode": 0,
@ -2054,16 +2151,16 @@
},
"_children": [
{
"__id__": 44
"__id__": 46
}
],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 48
},
{
"__id__": 47
"__id__": 49
}
],
"_prefab": null,
@ -2119,13 +2216,13 @@
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 47
}
],
"_prefab": null,
@ -2181,7 +2278,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 46
},
"_enabled": true,
"_materials": [
@ -2215,7 +2312,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 45
},
"_enabled": true,
"_materials": [
@ -2249,7 +2346,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 45
},
"_enabled": true,
"alignMode": 0,
@ -2384,10 +2481,10 @@
"__id__": 3
},
"stickhead": {
"__id__": 44
"__id__": 46
},
"base": {
"__id__": 43
"__id__": 45
},
"joyStickEps": 0.1,
"magicLeanLowerBound": 0.414,
@ -2408,10 +2505,10 @@
"linearMovingEps": 0.1,
"scaleByEps": 0.0375,
"btnA": {
"__id__": 34
"__id__": 36
},
"btnB": {
"__id__": 38
"__id__": 40
},
"_id": "e9oVYTr7ROlpp/IrNjBUmR"
}

View File

@ -461,7 +461,7 @@
"array": [
0,
0,
210.59754059453806,
216.65450766436658,
0,
0,
0,

View File

@ -77,12 +77,6 @@
],
"_active": true,
"_components": [
{
"__id__": 49
},
{
"__id__": 50
},
{
"__id__": 51
},
@ -91,6 +85,12 @@
},
{
"__id__": 53
},
{
"__id__": 54
},
{
"__id__": 55
}
],
"_prefab": null,
@ -276,21 +276,23 @@
"gameRulePrefab": null,
"findingPlayerPrefab": null,
"countdownToBeginGamePrefab": null,
"playersInfoPrefab": null,
"forceBigEndianFloatingNumDecoding": false,
"renderFrameIdLagTolerance": 4,
"sendingQLabel": {
"inputFrameFrontLabel": {
"__id__": 14
},
"inputFrameDownsyncQLabel": {
"sendingQLabel": {
"__id__": 16
},
"peerInputFrameUpsyncQLabel": {
"inputFrameDownsyncQLabel": {
"__id__": 18
},
"rollbackFramesLabel": {
"peerInputFrameUpsyncQLabel": {
"__id__": 20
},
"rollbackFramesLabel": {
"__id__": 22
},
"skippedRenderFrameCntLabel": null,
"_id": "e5xQdv12xLoIRr0b36Pie+"
},
@ -303,13 +305,13 @@
},
"_children": [
{
"__id__": 43
"__id__": 45
}
],
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
@ -371,20 +373,20 @@
{
"__id__": 7
},
{
"__id__": 32
},
{
"__id__": 34
},
{
"__id__": 38
"__id__": 36
},
{
"__id__": 40
}
],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 44
}
],
"_prefab": null,
@ -453,7 +455,7 @@
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 33
}
],
"_prefab": null,
@ -547,7 +549,7 @@
"array": [
0,
0,
209.61049002258042,
216.65450766436658,
0,
0,
0,
@ -631,12 +633,15 @@
},
{
"__id__": 23
},
{
"__id__": 25
}
],
"_active": true,
"_components": [
{
"__id__": 30
"__id__": 32
}
],
"_prefab": null,
@ -689,7 +694,7 @@
},
{
"__type__": "cc.Node",
"_name": "sendingQ",
"_name": "inputFrameFront",
"_objFlags": 0,
"_parent": {
"__id__": 12
@ -725,7 +730,7 @@
"ctor": "Float64Array",
"array": [
0,
76.48,
79.66666666666667,
0,
0,
0,
@ -747,7 +752,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "6fOGsdJxxKMLM7+K16V2wq"
"_id": "16ecz642FAMIrtMtKWTI/3"
},
{
"__type__": "cc.Label",
@ -777,11 +782,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "38SxePoOdHT4wrqnMdR0ql"
"_id": "e2W8Kja+VG7IEwuBQapscC"
},
{
"__type__": "cc.Node",
"_name": "inputFrameDownsyncQ",
"_name": "sendingQ",
"_objFlags": 0,
"_parent": {
"__id__": 12
@ -817,7 +822,7 @@
"ctor": "Float64Array",
"array": [
0,
38.239999999999995,
47.8,
0,
0,
0,
@ -839,7 +844,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c7OaUtV+9JaL4UcCC0gp8r"
"_id": "6fOGsdJxxKMLM7+K16V2wq"
},
{
"__type__": "cc.Label",
@ -869,11 +874,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "e22YW/mxlPRoYkJwMCezpE"
"_id": "38SxePoOdHT4wrqnMdR0ql"
},
{
"__type__": "cc.Node",
"_name": "peerInputFrameUpsyncQ",
"_name": "inputFrameDownsyncQ",
"_objFlags": 0,
"_parent": {
"__id__": 12
@ -909,7 +914,7 @@
"ctor": "Float64Array",
"array": [
0,
-7.105427357601002e-15,
15.933333333333325,
0,
0,
0,
@ -931,7 +936,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3fAMol6MJN+IHH1Ckh13wR"
"_id": "c7OaUtV+9JaL4UcCC0gp8r"
},
{
"__type__": "cc.Label",
@ -961,11 +966,11 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "3dO5iM/4VHVb21M3X82p0z"
"_id": "e22YW/mxlPRoYkJwMCezpE"
},
{
"__type__": "cc.Node",
"_name": "rollbackFrames",
"_name": "peerInputFrameUpsyncQ",
"_objFlags": 0,
"_parent": {
"__id__": 12
@ -1001,7 +1006,99 @@
"ctor": "Float64Array",
"array": [
0,
-38.24000000000001,
-15.933333333333346,
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": "3fAMol6MJN+IHH1Ckh13wR"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "0",
"_N$string": "0",
"_fontSize": 22,
"_lineHeight": 23,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "3dO5iM/4VHVb21M3X82p0z"
},
{
"__type__": "cc.Node",
"_name": "rollbackFrames",
"_objFlags": 0,
"_parent": {
"__id__": 12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 22
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 12.24,
"height": 28.98
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-47.80000000000002,
0,
0,
0,
@ -1030,7 +1127,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
"__id__": 21
},
"_enabled": true,
"_materials": [
@ -1066,7 +1163,7 @@
"_active": true,
"_components": [
{
"__id__": 22
"__id__": 24
}
],
"_prefab": null,
@ -1093,7 +1190,7 @@
"ctor": "Float64Array",
"array": [
0,
-76.48000000000002,
-79.66666666666669,
0,
0,
0,
@ -1122,7 +1219,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
"__id__": 23
},
"_enabled": true,
"_materials": [
@ -1158,19 +1255,19 @@
},
"_children": [
{
"__id__": 24
"__id__": 26
},
{
"__id__": 26
"__id__": 28
}
],
"_active": false,
"_components": [
{
"__id__": 28
"__id__": 30
},
{
"__id__": 29
"__id__": 31
}
],
"_prefab": null,
@ -1226,13 +1323,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 25
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 27
}
],
"_prefab": null,
@ -1288,7 +1385,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 26
},
"_enabled": true,
"_materials": [],
@ -1316,13 +1413,13 @@
"_name": "BoundRoomIdLabel",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 25
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 29
}
],
"_prefab": null,
@ -1378,7 +1475,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
"__id__": 28
},
"_enabled": true,
"_materials": [],
@ -1406,7 +1503,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 25
},
"_enabled": true,
"_layoutSize": {
@ -1439,7 +1536,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 25
},
"_enabled": true,
"_materials": [],
@ -1535,7 +1632,7 @@
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 35
}
],
"_prefab": null,
@ -1591,7 +1688,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 34
},
"_enabled": true,
"_materials": [
@ -1625,7 +1722,7 @@
},
"_children": [
{
"__id__": 35
"__id__": 37
}
],
"_active": true,
@ -1683,16 +1780,16 @@
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 38
},
{
"__id__": 37
"__id__": 39
}
],
"_prefab": null,
@ -1748,7 +1845,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"_materials": [
@ -1782,7 +1879,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"alignMode": 0,
@ -1813,7 +1910,7 @@
},
"_children": [
{
"__id__": 39
"__id__": 41
}
],
"_active": true,
@ -1871,16 +1968,16 @@
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 40
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 42
},
{
"__id__": 41
"__id__": 43
}
],
"_prefab": null,
@ -1936,7 +2033,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"_materials": [
@ -1970,7 +2067,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"alignMode": 0,
@ -2028,16 +2125,16 @@
},
"_children": [
{
"__id__": 44
"__id__": 46
}
],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 48
},
{
"__id__": 47
"__id__": 49
}
],
"_prefab": null,
@ -2093,13 +2190,13 @@
"_name": "Joystick",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 47
}
],
"_prefab": null,
@ -2155,7 +2252,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 46
},
"_enabled": true,
"_materials": [
@ -2189,7 +2286,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 45
},
"_enabled": true,
"_materials": [
@ -2223,7 +2320,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 45
},
"_enabled": true,
"alignMode": 0,
@ -2358,10 +2455,10 @@
"__id__": 3
},
"stickhead": {
"__id__": 44
"__id__": 46
},
"base": {
"__id__": 43
"__id__": 45
},
"joyStickEps": 0.1,
"magicLeanLowerBound": 0.414,
@ -2382,10 +2479,10 @@
"linearMovingEps": 0.1,
"scaleByEps": 0.0375,
"btnA": {
"__id__": 34
"__id__": 36
},
"btnB": {
"__id__": 38
"__id__": 40
},
"_id": "e9oVYTr7ROlpp/IrNjBUmR"
}

View File

@ -47,7 +47,7 @@ cc.Class({
},
hideExitButton() {
if (null == this.exitBtnNode != null) {
if (null == this.exitBtnNode) {
return;
}
this.exitBtnNode.active = false;

View File

@ -18,10 +18,15 @@ cc.Class({
type: cc.Integer,
default: 0
},
loadingNode: {
default: null,
type: cc.Node
},
},
// LIFE-CYCLE CALLBACKS:
onLoad() {},
onLoad() {
},
onSpeciesSelected(evt, val) {
for (let cell of this.characterSelectCells) {
@ -36,6 +41,15 @@ cc.Class({
},
onModeButtonClicked(evt) {
for (let cell of this.characterSelectCells) {
const comp = cell.getComponent("CharacterSelectCell");
comp.setInteractable(false);
}
this.modeButton.node.active = false;
this.loadingNode.active = true;
this.loadingNode.runAction(
cc.repeatForever(cc.rotateBy(1.0, 360))
);
this.mapNode.getComponent("Map").onGameRule1v1ModeClicked(this.chosenSpeciesId);
},
});

View File

@ -354,6 +354,7 @@ cc.Class({
self.loadingNode.getChildByName('loadingSprite').runAction(
cc.repeatForever(cc.rotateBy(1.0, 360))
);
self.loadingNode.getChildByName('loadingLabel').active = true;
cc.director.loadScene('default_map');
} else {
console.log("OnLoggedIn failed, about to remove `selfPlayer` in local cache.")

View File

@ -103,10 +103,6 @@ cc.Class({
type: cc.Prefab,
default: null
},
playersInfoPrefab: {
type: cc.Prefab,
default: null
},
forceBigEndianFloatingNumDecoding: {
default: false,
},
@ -114,6 +110,10 @@ cc.Class({
type: cc.Integer,
default: 4 // implies (renderFrameIdLagTolerance >> inputScaleFrames) count of inputFrameIds
},
inputFrameFrontLabel: {
type: cc.Label,
default: null
},
sendingQLabel: {
type: cc.Label,
default: null
@ -280,13 +280,6 @@ cc.Class({
}
},
onManualRejoinRequired(labelString) {
const self = this;
self.battleState = ALL_BATTLE_STATES.NONE; // Effectively stops "update(dt)"
self.showPopupInCanvas(self.gameRuleNode);
self.popupSimplePressToGo(labelString, false);
},
popupSimplePressToGo(labelString, hideYesButton) {
const self = this;
self.state = ALL_MAP_STATES.SHOWING_MODAL_POPUP;
@ -397,15 +390,6 @@ cc.Class({
self.allowRollbackOnPeerUpsync = true;
self.countdownNanos = null;
if (self.countdownLabel) {
self.countdownLabel.string = "";
}
if (self.playersInfoNode) {
safelyAddChild(self.widgetsAboveAllNode, self.playersInfoNode);
}
if (self.findingPlayerNode) {
safelyAddChild(self.widgetsAboveAllNode, self.findingPlayerNode);
}
},
initDebugDrawers() {
@ -459,7 +443,7 @@ cc.Class({
},
onLoad() {
cc.game.setFrameRate(60);
cc.game.setFrameRate(59);
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
cc.view.enableAutoFullScreen(true);
@ -508,8 +492,6 @@ cc.Class({
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.init(self);
self.playersInfoNode = cc.instantiate(self.playersInfoPrefab);
self.countdownToBeginGameNode = cc.instantiate(self.countdownToBeginGamePrefab);
self.countdownToBeginGameNode.width = self.canvasNode.width;
self.countdownToBeginGameNode.height = self.canvasNode.height;
@ -551,6 +533,11 @@ cc.Class({
tiledMapIns.tmxAsset = null;
mapNode.removeAllChildren();
self._resetCurrentMatch();
if (self.countdownLabel) {
self.countdownLabel.string = "";
}
self.hideGameRuleNode();
self.showFindingPlayerGUI(null);
tiledMapIns.tmxAsset = tmxAsset;
const newMapSize = tiledMapIns.getMapSize();
@ -597,7 +584,6 @@ cc.Class({
self.initAfterWSConnected = () => {
const self = window.mapIns;
self.hideGameRuleNode();
self.transitToState(ALL_MAP_STATES.WAITING);
self._inputControlEnabled = false;
}
@ -643,7 +629,8 @@ cc.Class({
if (null == self.gameRuleNode) {
return;
}
self.gameRuleNode.active = false;
//self.gameRuleNode.active = false;
self.gameRuleNode.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE));
},
enableInputControls() {
@ -718,14 +705,6 @@ cc.Class({
self.chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(pbRdf.speciesIdList);
self._initPlayerRichInfoDict(rdf.PlayersArr);
// Show the top status indicators for IN_BATTLE
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in pbRdf.playersArr) {
playersInfoScriptIns.updateData(pbRdf.playersArr[i]);
}
}
if (shouldForceDumping1 || shouldForceDumping2 || shouldForceResync) {
// In fact, not having "window.RING_BUFF_CONSECUTIVE_SET == dumpRenderCacheRet" should already imply that "self.renderFrameId <= rdf.id", but here we double check and log the anomaly
@ -1009,12 +988,7 @@ fromUDP=${fromUDP}`);
onPlayerAdded(rdf /* pb.RoomDownsyncFrame */ ) {
const self = this;
// Update the "finding player" GUI and show it if not previously present
if (!self.findingPlayerNode.parent) {
self.showPopupInCanvas(self.findingPlayerNode);
}
let findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.updatePlayersInfo(rdf.playersArr);
self.showFindingPlayerGUI(rdf);
},
onBattleStopped() {
@ -1034,9 +1008,6 @@ fromUDP=${fromUDP}`);
resultPanelScriptIns.showPlayerInfo(self.playerRichInfoDict);
window.clearBoundRoomIdInBothVolatileAndPersistentStorage();
self.showPopupInCanvas(resultPanelNode);
// Clear player info
self.playersInfoNode.getComponent("PlayersInfo").clearInfo();
},
spawnPlayerNode(joinIndex, vx, vy, playerDownsyncInfo) {
@ -1092,6 +1063,7 @@ fromUDP=${fromUDP}`);
currSelfInput = null;
if (gopkgs.ShouldGenerateInputFrameUpsync(self.renderFrameId)) {
[prevSelfInput, currSelfInput] = self.getOrPrefabInputFrameUpsync(noDelayInputFrameId, true);
self.networkDoctor.logInputFrameIdFront(noDelayInputFrameId);
}
const delayedInputFrameId = gopkgs.ConvertToDelayedInputFrameId(self.renderFrameId);
@ -1143,8 +1115,6 @@ fromUDP=${fromUDP}`);
console.warn(`Mismatched render frame@rdf.id=${rdf.Id} w/ inputFrameId=${delayedInputFrameId}:
rdf=${JSON.stringify(rdf)}
othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame)}`);
// closeWSConnection(constants.RET_CODE.CLIENT_MISMATCHED_RENDER_FRAME, "");
// self.onManualRejoinRequired("[DEBUG] CLIENT_MISMATCHED_RENDER_FRAME");
rdf = othersForcedDownsyncRenderFrame;
self.othersForcedDownsyncRenderFrameDict.delete(rdf.Id);
}
@ -1235,7 +1205,6 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
self.battleState = ALL_BATTLE_STATES.WAITING;
window.chosenSpeciesId = chosenSpeciesId; // TODO: Find a better way to pass it into "self.initAfterWSConnected"!
window.initPersistentSessionClient(self.initAfterWSConnected, null /* Deliberately NOT passing in any `expectedRoomId`. -- YFLu */ );
self.hideGameRuleNode();
},
showPopupInCanvas(toShowNode) {
@ -1247,6 +1216,18 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
setLocalZOrder(toShowNode, 10);
},
showFindingPlayerGUI(rdf) {
const self = this;
// Update the "finding player" GUI and show it if not previously present
if (!self.findingPlayerNode.parent) {
self.showPopupInCanvas(self.findingPlayerNode);
}
if (null != rdf) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
findingPlayerScriptIns.updatePlayersInfo(rdf.playersArr);
}
},
hideFindingPlayersGUI(rdf) {
const self = this;
// [WARNING] "cc.Node.removeChild" would trigger massive update of rendering nodes, thus a performance impact at the beginning of battle, avoid it by just moving the widget to infinitely far away!
@ -1259,13 +1240,6 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame
const self = this;
const players = rdf.playersArr;
// Show the top status indicators for IN_BATTLE
if (self.playersInfoNode) {
const playersInfoScriptIns = self.playersInfoNode.getComponent("PlayersInfo");
for (let i in players) {
playersInfoScriptIns.updateData(players[i]);
}
}
console.log("Calling `onBattleReadyToStart` with:", players);
if (self.findingPlayerNode) {
const findingPlayerScriptIns = self.findingPlayerNode.getComponent("FindingPlayer");
@ -1654,7 +1628,10 @@ actuallyUsedinputList:{${self.inputFrameDownsyncStr(actuallyUsedInputClone)}}`);
showNetworkDoctorLabels() {
const self = this;
const [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = self.networkDoctor.stats();
const [inputFrameFront, sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, skippedRenderFrameCnt] = self.networkDoctor.stats();
if (self.inputFrameFrontLabel) {
self.inputFrameFrontLabel.string = `${inputFrameFront} inputFrameId front`;
}
if (self.sendingQLabel) {
self.sendingQLabel.string = `${sendingFps} fps sending`;
if (sendingFps < self.networkDoctor.inputRateThreshold) {

View File

@ -5,6 +5,7 @@ var NetworkDoctor = function(capacity) {
};
NetworkDoctor.prototype.reset = function(capacity) {
this.inputFrameIdFront = 0;
this.sendingQ = new RingBuffer(capacity);
this.inputFrameDownsyncQ = new RingBuffer(capacity);
this.peerInputFrameUpsyncQ = new RingBuffer(capacity);
@ -17,6 +18,10 @@ NetworkDoctor.prototype.reset = function(capacity) {
this.rollbackFramesThreshold = 8; // Roughly the minimum "TurnAroundFramesToRecover".
};
NetworkDoctor.prototype.logInputFrameIdFront = function(inputFrameId) {
this.inputFrameIdFront = inputFrameId;
};
NetworkDoctor.prototype.logSending = function(stFrameId, edFrameId) {
this.sendingQ.put({
i: stFrameId,
@ -72,7 +77,7 @@ NetworkDoctor.prototype.stats = function() {
const elapsedMillis = ed.t - st.t;
peerUpsyncFps = Math.round(this.peerInputFrameUpsyncCnt * 1000 / elapsedMillis);
}
return [sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, this.skippedRenderFrameCnt];
return [this.inputFrameIdFront, sendingFps, srvDownsyncFps, peerUpsyncFps, rollbackFrames, this.skippedRenderFrameCnt];
};
NetworkDoctor.prototype.logSkippedRenderFrameCnt = function() {

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ const (
GRAVITY_X = int32(0)
GRAVITY_Y = -int32(float64(0.5) * WORLD_TO_VIRTUAL_GRID_RATIO) // makes all "playerCollider.Y" a multiple of 0.5 in all cases
INPUT_DELAY_FRAMES = int32(5) // in the count of render frames
INPUT_DELAY_FRAMES = int32(6) // in the count of render frames
/*
[WARNING]