Commit 77ea3b05 authored by liujiangnan's avatar liujiangnan

feat: 尺寸适配

parent 0bb519c8
{
"ver": "1.1.0",
"uuid": "9b322003-d848-4b51-b4a2-e6de8c4daaf1",
"subMetas": {}
}
\ No newline at end of file
...@@ -305,43 +305,43 @@ ...@@ -305,43 +305,43 @@
"__id__": 17 "__id__": 17
}, },
{ {
"__id__": 20 "__id__": 24
}, },
{ {
"__id__": 24 "__id__": 27
}, },
{ {
"__id__": 28 "__id__": 31
}, },
{ {
"__id__": 30 "__id__": 34
}, },
{ {
"__id__": 43 "__id__": 48
}, },
{ {
"__id__": 52 "__id__": 57
}, },
{ {
"__id__": 55 "__id__": 60
}, },
{ {
"__id__": 80 "__id__": 85
}, },
{ {
"__id__": 82 "__id__": 87
}, },
{ {
"__id__": 86 "__id__": 91
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 89 "__id__": 94
}, },
{ {
"__id__": 90 "__id__": 95
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
"__id__": 8 "__id__": 8
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 10 "__id__": 10
...@@ -423,27 +423,27 @@ ...@@ -423,27 +423,27 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 83, "width": 45,
"height": 83 "height": 45
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0,
"y": 0.5 "y": 1
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-615.405, -640,
334.563, 360,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
0.5, 1,
0.5, 1,
1 1
] ]
}, },
...@@ -468,13 +468,15 @@ ...@@ -468,13 +468,15 @@
"__id__": 9 "__id__": 9
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": null, "_grayMaterial": null,
"duration": 0.1, "duration": 0.1,
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [], "clickEvents": [],
"_N$interactable": true, "_N$interactable": true,
"_N$enableAutoGrayEffect": false, "_N$enableAutoGrayEffect": true,
"_N$transition": 0, "_N$transition": 0,
"transition": 0, "transition": 0,
"_N$normalColor": { "_N$normalColor": {
...@@ -535,14 +537,14 @@ ...@@ -535,14 +537,14 @@
"node": { "node": {
"__id__": 9 "__id__": 9
}, },
"_enabled": true, "_enabled": false,
"alignMode": 2, "alignMode": 2,
"_target": null, "_target": null,
"_alignFlags": 9, "_alignFlags": 0,
"_left": 3.8450000000000273, "_left": 8,
"_right": 0, "_right": 1211.243,
"_top": 4.687000000000012, "_top": 8,
"_bottom": 0, "_bottom": 653.047,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -551,8 +553,8 @@ ...@@ -551,8 +553,8 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 0, "_originalWidth": 55,
"_originalHeight": 0, "_originalHeight": 55,
"_id": "669Abf8UBIJ5w+8w83zBHw" "_id": "669Abf8UBIJ5w+8w83zBHw"
}, },
{ {
...@@ -574,7 +576,7 @@ ...@@ -574,7 +576,7 @@
"__uuid__": "6d891122-fcef-4c63-85ef-f02245a0befd" "__uuid__": "6d891122-fcef-4c63-85ef-f02245a0befd"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -595,7 +597,7 @@ ...@@ -595,7 +597,7 @@
"__id__": 8 "__id__": 8
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 14 "__id__": 14
...@@ -618,27 +620,27 @@ ...@@ -618,27 +620,27 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 75, "width": 45,
"height": 74 "height": 45
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 1,
"y": 0.5 "y": 1
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
507.432, 529.781,
336.763, 351.479,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
0.5, 1,
0.5, 1,
1 1
] ]
}, },
...@@ -735,8 +737,8 @@ ...@@ -735,8 +737,8 @@
"_target": null, "_target": null,
"_alignFlags": 33, "_alignFlags": 33,
"_left": 20, "_left": 20,
"_right": 113.81799999999993, "_right": 110.21900000000005,
"_top": 4.737000000000023, "_top": 8.521000000000015,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
...@@ -769,7 +771,7 @@ ...@@ -769,7 +771,7 @@
"__uuid__": "44f288b3-7630-4926-afb3-d2f55b24cee4" "__uuid__": "44f288b3-7630-4926-afb3-d2f55b24cee4"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -789,14 +791,203 @@ ...@@ -789,14 +791,203 @@
"_parent": { "_parent": {
"__id__": 8 "__id__": 8
}, },
"_children": [
{
"__id__": 18
},
{
"__id__": 21
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 45
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 1,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
586.899,
354.212,
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": "80IMii31hHP52+UPkvsria"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 17
},
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 19
},
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 0,
"_color": {
"__type__": "cc.Color",
"r": 28,
"g": 6,
"b": 6,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 45
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-30,
-22.5,
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": "d1CjtTKXxAk4Tdj6o2iVEn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18 "__id__": 18
}, },
"_enabled": true,
"_materials": [
{ {
"__id__": 19 "__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": "419R/CCx9ECq6SydnPdueu"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_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": 100,
"_originalHeight": 100,
"_id": "02+tg+6opAPYrk2kVZlidB"
},
{
"__type__": "cc.Node",
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 17
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 22
},
{
"__id__": 23
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -810,8 +1001,8 @@ ...@@ -810,8 +1001,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 50.04, "width": 37.52,
"height": 45.36 "height": 31.5
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -822,8 +1013,8 @@ ...@@ -822,8 +1013,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
560.574, -30,
337.56199999999995, -22.5,
0, 0,
0, 0,
0, 0,
...@@ -852,7 +1043,7 @@ ...@@ -852,7 +1043,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 21
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -864,11 +1055,13 @@ ...@@ -864,11 +1055,13 @@
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "1/5", "_string": "1/5",
"_N$string": "1/5", "_N$string": "1/5",
"_fontSize": 36, "_fontSize": 25,
"_lineHeight": 36, "_lineHeight": 25,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": null, "_N$file": {
"_isSystemFontUsed": true, "__uuid__": "9b322003-d848-4b51-b4a2-e6de8c4daaf1"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_batchAsBitmap": false, "_batchAsBitmap": false,
"_styleFlags": 0, "_styleFlags": 0,
...@@ -885,15 +1078,15 @@ ...@@ -885,15 +1078,15 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 21
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 33, "_alignFlags": 18,
"_left": 0, "_left": 0,
"_right": 54.406000000000105, "_right": 0,
"_top": -0.24199999999999022, "_top": 0,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
...@@ -905,7 +1098,7 @@ ...@@ -905,7 +1098,7 @@
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 0, "_originalWidth": 0,
"_originalHeight": 0, "_originalHeight": 0,
"_id": "cfDPVpdOhNA6P/O5zgALYZ" "_id": "87WCUIEEVONaAQxCmzvwdX"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -915,16 +1108,13 @@ ...@@ -915,16 +1108,13 @@
"__id__": 8 "__id__": 8
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 21 "__id__": 25
},
{
"__id__": 22
}, },
{ {
"__id__": 23 "__id__": 26
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -938,27 +1128,27 @@ ...@@ -938,27 +1128,27 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 75, "width": 45,
"height": 74 "height": 45
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 1,
"y": 0.5 "y": 1
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
614.81, 629.092,
336.96, 350.342,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
0.5, 1,
0.5, 1,
1 1
] ]
}, },
...@@ -980,7 +1170,7 @@ ...@@ -980,7 +1170,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 20 "__id__": 24
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1040,42 +1230,15 @@ ...@@ -1040,42 +1230,15 @@
"_N$hoverSprite": null, "_N$hoverSprite": null,
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": null, "_N$target": null,
"_id": "c5vS0hDupNequQ4j3jK6Uk" "_id": "c5vS0hDupNequQ4j3jK6Uk"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 33,
"_left": 20,
"_right": 6.440000000000055,
"_top": 4.5400000000000205,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 84,
"_originalHeight": 0,
"_id": "e3o0XQ1KlN9qhDSk0KTqMm"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 20 "__id__": 24
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1089,7 +1252,7 @@ ...@@ -1089,7 +1252,7 @@
"__uuid__": "2c64c55e-8670-4efb-9a72-b070cb8f7522" "__uuid__": "2c64c55e-8670-4efb-9a72-b070cb8f7522"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1113,13 +1276,13 @@ ...@@ -1113,13 +1276,13 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 28
}, },
{ {
"__id__": 26 "__id__": 29
}, },
{ {
"__id__": 27 "__id__": 30
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1175,7 +1338,7 @@ ...@@ -1175,7 +1338,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 27
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 2,
...@@ -1202,7 +1365,7 @@ ...@@ -1202,7 +1365,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 27
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1270,7 +1433,7 @@ ...@@ -1270,7 +1433,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 27
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1308,7 +1471,10 @@ ...@@ -1308,7 +1471,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 29 "__id__": 32
},
{
"__id__": 33
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1364,7 +1530,7 @@ ...@@ -1364,7 +1530,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 28 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -1391,6 +1557,16 @@ ...@@ -1391,6 +1557,16 @@
"_N$affectedByScale": false, "_N$affectedByScale": false,
"_id": "f8moL2AXVNK5F4ZX+EkYD6" "_id": "f8moL2AXVNK5F4ZX+EkYD6"
}, },
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
},
"_enabled": true,
"_id": "fcSJWwUqFG06HL/ANvLTE9"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "loadingLayer", "_name": "loadingLayer",
...@@ -1400,19 +1576,19 @@ ...@@ -1400,19 +1576,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 31 "__id__": 35
}, },
{ {
"__id__": 33 "__id__": 38
}, },
{ {
"__id__": 35 "__id__": 40
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 42 "__id__": 47
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1468,13 +1644,16 @@ ...@@ -1468,13 +1644,16 @@
"_name": "mask", "_name": "mask",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 30 "__id__": 34
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 32 "__id__": 36
},
{
"__id__": 37
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1530,7 +1709,7 @@ ...@@ -1530,7 +1709,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 31 "__id__": 35
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1557,18 +1736,28 @@ ...@@ -1557,18 +1736,28 @@
"_atlas": null, "_atlas": null,
"_id": "32/X5kHO5IhrrGj5p1Pzwt" "_id": "32/X5kHO5IhrrGj5p1Pzwt"
}, },
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
},
"_enabled": true,
"_id": "a8IwvU51BDCIOSzzyHs4ur"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "loading_ske", "_name": "loading_ske",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 30 "__id__": 34
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 34 "__id__": 39
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1624,7 +1813,7 @@ ...@@ -1624,7 +1813,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 33 "__id__": 38
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1664,24 +1853,24 @@ ...@@ -1664,24 +1853,24 @@
"_name": "progress", "_name": "progress",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 30 "__id__": 34
}, },
"_children": [ "_children": [
{ {
"__id__": 36 "__id__": 41
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 39 "__id__": 44
}, },
{ {
"__id__": 40 "__id__": 45
} }
], ],
"_prefab": { "_prefab": {
"__id__": 41 "__id__": 46
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -1735,17 +1924,17 @@ ...@@ -1735,17 +1924,17 @@
"_name": "bar", "_name": "bar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 35 "__id__": 40
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 37 "__id__": 42
} }
], ],
"_prefab": { "_prefab": {
"__id__": 38 "__id__": 43
}, },
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -1799,7 +1988,7 @@ ...@@ -1799,7 +1988,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 36 "__id__": 41
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1829,7 +2018,7 @@ ...@@ -1829,7 +2018,7 @@
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
"__id__": 35 "__id__": 40
}, },
"asset": { "asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4" "__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
...@@ -1842,7 +2031,7 @@ ...@@ -1842,7 +2031,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 35 "__id__": 40
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1874,7 +2063,7 @@ ...@@ -1874,7 +2063,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 35 "__id__": 40
}, },
"_enabled": true, "_enabled": true,
"_id": "3eMT/DXoJNGZT/8Z3nuTUH" "_id": "3eMT/DXoJNGZT/8Z3nuTUH"
...@@ -1882,7 +2071,7 @@ ...@@ -1882,7 +2071,7 @@
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
"__id__": 35 "__id__": 40
}, },
"asset": { "asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4" "__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
...@@ -1895,7 +2084,7 @@ ...@@ -1895,7 +2084,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 30 "__id__": 34
}, },
"_enabled": true, "_enabled": true,
"_id": "3aadbr2ilKYLzzvQrMvCTR" "_id": "3aadbr2ilKYLzzvQrMvCTR"
...@@ -1909,16 +2098,16 @@ ...@@ -1909,16 +2098,16 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 44 "__id__": 49
}, },
{ {
"__id__": 47 "__id__": 52
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 51 "__id__": 56
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1974,16 +2163,16 @@ ...@@ -1974,16 +2163,16 @@
"_name": "bg", "_name": "bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 43 "__id__": 48
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 45 "__id__": 50
}, },
{ {
"__id__": 46 "__id__": 51
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2039,7 +2228,7 @@ ...@@ -2039,7 +2228,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 44 "__id__": 49
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2071,7 +2260,7 @@ ...@@ -2071,7 +2260,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 44 "__id__": 49
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -2098,17 +2287,17 @@ ...@@ -2098,17 +2287,17 @@
"_name": "tips", "_name": "tips",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 43 "__id__": 48
}, },
"_children": [ "_children": [
{ {
"__id__": 48 "__id__": 53
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 50 "__id__": 55
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2164,13 +2353,13 @@ ...@@ -2164,13 +2353,13 @@
"_name": "label", "_name": "label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 47 "__id__": 52
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 49 "__id__": 54
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2226,7 +2415,7 @@ ...@@ -2226,7 +2415,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 48 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2259,7 +2448,7 @@ ...@@ -2259,7 +2448,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 47 "__id__": 52
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2291,7 +2480,7 @@ ...@@ -2291,7 +2480,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 43 "__id__": 48
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -2324,10 +2513,10 @@ ...@@ -2324,10 +2513,10 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 53 "__id__": 58
}, },
{ {
"__id__": 54 "__id__": 59
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2383,7 +2572,7 @@ ...@@ -2383,7 +2572,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 52 "__id__": 57
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2416,7 +2605,7 @@ ...@@ -2416,7 +2605,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 52 "__id__": 57
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -2447,19 +2636,19 @@ ...@@ -2447,19 +2636,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 56 "__id__": 61
}, },
{ {
"__id__": 59 "__id__": 64
}, },
{ {
"__id__": 74 "__id__": 79
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 79 "__id__": 84
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2515,16 +2704,16 @@ ...@@ -2515,16 +2704,16 @@
"_name": "bg", "_name": "bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 55 "__id__": 60
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 57 "__id__": 62
}, },
{ {
"__id__": 58 "__id__": 63
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2580,7 +2769,7 @@ ...@@ -2580,7 +2769,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 56 "__id__": 61
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2612,7 +2801,7 @@ ...@@ -2612,7 +2801,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 56 "__id__": 61
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -2639,20 +2828,20 @@ ...@@ -2639,20 +2828,20 @@
"_name": "active_bg", "_name": "active_bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 55 "__id__": 60
}, },
"_children": [ "_children": [
{ {
"__id__": 60 "__id__": 65
}, },
{ {
"__id__": 62 "__id__": 67
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 73 "__id__": 78
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2708,13 +2897,13 @@ ...@@ -2708,13 +2897,13 @@
"_name": "label", "_name": "label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 59 "__id__": 64
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 61 "__id__": 66
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2770,7 +2959,7 @@ ...@@ -2770,7 +2959,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 60 "__id__": 65
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2803,23 +2992,23 @@ ...@@ -2803,23 +2992,23 @@
"_name": "active_input", "_name": "active_input",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 59 "__id__": 64
}, },
"_children": [ "_children": [
{ {
"__id__": 63 "__id__": 68
}, },
{ {
"__id__": 66 "__id__": 71
}, },
{ {
"__id__": 69 "__id__": 74
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 72 "__id__": 77
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2875,16 +3064,16 @@ ...@@ -2875,16 +3064,16 @@
"_name": "BACKGROUND_SPRITE", "_name": "BACKGROUND_SPRITE",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 62 "__id__": 67
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 64 "__id__": 69
}, },
{ {
"__id__": 65 "__id__": 70
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2940,7 +3129,7 @@ ...@@ -2940,7 +3129,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 63 "__id__": 68
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2972,7 +3161,7 @@ ...@@ -2972,7 +3161,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 63 "__id__": 68
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -2999,16 +3188,16 @@ ...@@ -2999,16 +3188,16 @@
"_name": "TEXT_LABEL", "_name": "TEXT_LABEL",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 62 "__id__": 67
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 67 "__id__": 72
}, },
{ {
"__id__": 68 "__id__": 73
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3064,7 +3253,7 @@ ...@@ -3064,7 +3253,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 66 "__id__": 71
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3097,7 +3286,7 @@ ...@@ -3097,7 +3286,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 66 "__id__": 71
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -3124,16 +3313,16 @@ ...@@ -3124,16 +3313,16 @@
"_name": "PLACEHOLDER_LABEL", "_name": "PLACEHOLDER_LABEL",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 62 "__id__": 67
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 70 "__id__": 75
}, },
{ {
"__id__": 71 "__id__": 76
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3189,7 +3378,7 @@ ...@@ -3189,7 +3378,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 69 "__id__": 74
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3222,7 +3411,7 @@ ...@@ -3222,7 +3411,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 69 "__id__": 74
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -3249,7 +3438,7 @@ ...@@ -3249,7 +3438,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 62 "__id__": 67
}, },
"_enabled": true, "_enabled": true,
"_string": "", "_string": "",
...@@ -3261,13 +3450,13 @@ ...@@ -3261,13 +3450,13 @@
"editingDidEnded": [], "editingDidEnded": [],
"editingReturn": [], "editingReturn": [],
"_N$textLabel": { "_N$textLabel": {
"__id__": 67 "__id__": 72
}, },
"_N$placeholderLabel": { "_N$placeholderLabel": {
"__id__": 70 "__id__": 75
}, },
"_N$background": { "_N$background": {
"__id__": 64 "__id__": 69
}, },
"_N$inputFlag": 5, "_N$inputFlag": 5,
"_N$inputMode": 6, "_N$inputMode": 6,
...@@ -3279,7 +3468,7 @@ ...@@ -3279,7 +3468,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 59 "__id__": 64
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3311,20 +3500,20 @@ ...@@ -3311,20 +3500,20 @@
"_name": "active", "_name": "active",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 55 "__id__": 60
}, },
"_children": [ "_children": [
{ {
"__id__": 75 "__id__": 80
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 77 "__id__": 82
}, },
{ {
"__id__": 78 "__id__": 83
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3380,13 +3569,13 @@ ...@@ -3380,13 +3569,13 @@
"_name": "New Label", "_name": "New Label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 74 "__id__": 79
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 76 "__id__": 81
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3442,7 +3631,7 @@ ...@@ -3442,7 +3631,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 75 "__id__": 80
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3475,7 +3664,7 @@ ...@@ -3475,7 +3664,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 74 "__id__": 79
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3507,7 +3696,7 @@ ...@@ -3507,7 +3696,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 74 "__id__": 79
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -3575,7 +3764,7 @@ ...@@ -3575,7 +3764,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 55 "__id__": 60
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -3608,7 +3797,7 @@ ...@@ -3608,7 +3797,7 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 81 "__id__": 86
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3664,7 +3853,7 @@ ...@@ -3664,7 +3853,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 80 "__id__": 85
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3702,13 +3891,13 @@ ...@@ -3702,13 +3891,13 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 83 "__id__": 88
}, },
{ {
"__id__": 84 "__id__": 89
}, },
{ {
"__id__": 85 "__id__": 90
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3764,7 +3953,7 @@ ...@@ -3764,7 +3953,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 82 "__id__": 87
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3796,7 +3985,7 @@ ...@@ -3796,7 +3985,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 82 "__id__": 87
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -3864,7 +4053,7 @@ ...@@ -3864,7 +4053,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 82 "__id__": 87
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -3895,7 +4084,7 @@ ...@@ -3895,7 +4084,7 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 87 "__id__": 92
} }
], ],
"_active": true, "_active": true,
...@@ -3953,13 +4142,13 @@ ...@@ -3953,13 +4142,13 @@
"_name": "btn", "_name": "btn",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 86 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 88 "__id__": 93
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4015,7 +4204,7 @@ ...@@ -4015,7 +4204,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 87 "__id__": 92
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
......
...@@ -62,8 +62,6 @@ export default class NewClass extends middleLayerBase { ...@@ -62,8 +62,6 @@ export default class NewClass extends middleLayerBase {
this.hideWaitingLetters(); this.hideWaitingLetters();
} }
// 统一释放异步资源的方法 // 统一释放异步资源的方法
onLoad() { onLoad() {
initAir(this); initAir(this);
...@@ -85,7 +83,6 @@ export default class NewClass extends middleLayerBase { ...@@ -85,7 +83,6 @@ export default class NewClass extends middleLayerBase {
cc.find('middleLayer/Page').active = false; cc.find('middleLayer/Page').active = false;
cc.find('middleLayer/ExitBtn').active = false; cc.find('middleLayer/ExitBtn').active = false;
// if (this.type == '') { // if (this.type == '') {
// await this.asyncCallNetworkApiGet(`/api/aixuebao/v1/engine/active`, { // await this.asyncCallNetworkApiGet(`/api/aixuebao/v1/engine/active`, {
// engineid: this.engine_uuid, // engineid: this.engine_uuid,
...@@ -102,7 +99,13 @@ export default class NewClass extends middleLayerBase { ...@@ -102,7 +99,13 @@ export default class NewClass extends middleLayerBase {
cc.sys.localStorage.setItem('activeSyllabuses', sylles); cc.sys.localStorage.setItem('activeSyllabuses', sylles);
this.showWaitingLetters(); this.showWaitingLetters();
this.loadOnlineBundle("cartoon_main"); this.loadOnlineBundle("cartoon_main", () => {
// 记录一个初始的缩放值 用于适配
const canvas = cc.find('Canvas');
const middleLayer = cc.find('middleLayer');
const sc = canvas.height / middleLayer.height;
this.BASE_SCALE = sc;
});
} else { } else {
cc.find(`middleLayer/activeLayer`).active = true; cc.find(`middleLayer/activeLayer`).active = true;
} }
...@@ -143,7 +146,7 @@ export default class NewClass extends middleLayerBase { ...@@ -143,7 +146,7 @@ export default class NewClass extends middleLayerBase {
this.showWaitingLetters(); this.showWaitingLetters();
this.loadOnlineBundle("cartoon_main"); this.loadOnlineBundle("cartoon_main");
}, 0.5) })
buttonOnClick(cc.find('middleLayer/BtnRight'), () => { buttonOnClick(cc.find('middleLayer/BtnRight'), () => {
if (this.isShowWaiting) { if (this.isShowWaiting) {
...@@ -160,7 +163,7 @@ export default class NewClass extends middleLayerBase { ...@@ -160,7 +163,7 @@ export default class NewClass extends middleLayerBase {
} else { } else {
cc.find('middleLayer/BtnRight').active = true; cc.find('middleLayer/BtnRight').active = true;
} }
}, 0.5); });
buttonOnClick(cc.find('middleLayer/BtnLeft'), () => { buttonOnClick(cc.find('middleLayer/BtnLeft'), () => {
if (this.isShowWaiting) { if (this.isShowWaiting) {
...@@ -177,7 +180,7 @@ export default class NewClass extends middleLayerBase { ...@@ -177,7 +180,7 @@ export default class NewClass extends middleLayerBase {
} else { } else {
cc.find('middleLayer/BtnRight').active = true; cc.find('middleLayer/BtnRight').active = true;
} }
}, 0.5); });
buttonOnClick(cc.find('middleLayer/activeLayer/active'), async () => { buttonOnClick(cc.find('middleLayer/activeLayer/active'), async () => {
if (this.isShowWaiting) { if (this.isShowWaiting) {
......
...@@ -16,6 +16,7 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -16,6 +16,7 @@ export abstract class middleLayerBase extends cc.Component {
abstract hideWaitingLetters(): void; abstract hideWaitingLetters(): void;
abstract showWaitingLetters(): void; abstract showWaitingLetters(): void;
BASE_SCALE;
onMiddleLayerLoadingFinish() { onMiddleLayerLoadingFinish() {
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) { if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
...@@ -160,6 +161,34 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -160,6 +161,34 @@ export abstract class middleLayerBase extends cc.Component {
this.loadBundle(sceneName, version, bondleUrl); this.loadBundle(sceneName, version, bondleUrl);
} }
setBtnLayer() {
const sc = this.BASE_SCALE;
const middleLayer = cc.find('middleLayer');
const extBtn = cc.find(`ExitBtn`, middleLayer);
extBtn.x = 0 - (middleLayer.width/2-8);
extBtn.y = middleLayer.height/2-8;
extBtn.width = 45 / sc;
extBtn.height = 45 / sc;
const rightBtn = cc.find(`BtnRight`, middleLayer);
rightBtn.x = middleLayer.width/2-8;
rightBtn.y = middleLayer.height/2-8;
rightBtn.width = 45 / sc;
rightBtn.height = 45 / sc;
const leftBtn = cc.find(`BtnLeft`, middleLayer);
leftBtn.x = middleLayer.width/2-108;
leftBtn.y = middleLayer.height/2-8;
leftBtn.width = 45 / sc;
leftBtn.height = 45 / sc;
const page = cc.find(`Page`, middleLayer);
page.x = middleLayer.width/2-53;
page.y = middleLayer.height/2-6;
page.width = 60 / sc;
page.height = 45 / sc;
}
async loadBundle(sceneName, version, bondleUrl, callback = null) { async loadBundle(sceneName, version, bondleUrl, callback = null) {
this.currentBundleInfo = { sceneName, version, bondleUrl }; this.currentBundleInfo = { sceneName, version, bondleUrl };
this.showWaitingLetters(); this.showWaitingLetters();
...@@ -180,9 +209,10 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -180,9 +209,10 @@ export abstract class middleLayerBase extends cc.Component {
const canvas = cc.find('Canvas'); const canvas = cc.find('Canvas');
const middleLayer = cc.find('middleLayer'); const middleLayer = cc.find('middleLayer');
canvas.getComponent(cc.Widget).updateAlignment(); canvas.getComponent(cc.Widget).updateAlignment();
middleLayer.scale = canvas.width / middleLayer.width; const sc = canvas.height / middleLayer.height;
middleLayer.scale = sc;
this.setBtnLayer(sc);
callback && callback(); callback && callback();
// this.showLog('middleLayer.scale = ' + middleLayer.scale);
}); });
}); });
}); });
...@@ -239,12 +269,8 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -239,12 +269,8 @@ export abstract class middleLayerBase extends cc.Component {
this.courses = data.rows; this.courses = data.rows;
this.courseIndex = data.index || 0; this.courseIndex = data.index || 0;
this.courseItem = data.rows[this.courseIndex]; this.courseItem = data.rows[this.courseIndex];
console.log('-----------------');
console.log("jfdlisjlfiasjdjl");
console.log('-----------------');
cc.find('middleLayer/Page').active = true; cc.find('middleLayer/Page').active = true;
cc.find(`middleLayer/Page`).getComponent(cc.Label).string = `1/${this.courses.length}`; cc.find(`middleLayer/Page/text`).getComponent(cc.Label).string = `1/${this.courses.length}`;
} else { } else {
this.hideWaitingLetters(); this.hideWaitingLetters();
this.showTips(`内容还未制作`); this.showTips(`内容还未制作`);
...@@ -299,7 +325,7 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -299,7 +325,7 @@ export abstract class middleLayerBase extends cc.Component {
(<any>window).courseware.freeAllOcMethod(); (<any>window).courseware.freeAllOcMethod();
cc.find(`middleLayer/Page`).getComponent(cc.Label).string = `${index + 1}/${this.courses.length}`; cc.find(`middleLayer/Page/text`).getComponent(cc.Label).string = `${index + 1}/${this.courses.length}`;
this.courseIndex = index; this.courseIndex = index;
this.courseItem = this.courses[this.courseIndex]; this.courseItem = this.courses[this.courseIndex];
this.loadPageBundle(); this.loadPageBundle();
......
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