Commit 1ef49150 authored by liujiangnan's avatar liujiangnan

feat: 调用原生方法测试

parent a6c4c931
...@@ -298,16 +298,16 @@ ...@@ -298,16 +298,16 @@
"__id__": 22 "__id__": 22
}, },
{ {
"__id__": 84 "__id__": 98
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 119 "__id__": 133
}, },
{ {
"__id__": 120 "__id__": 134
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1071,12 +1071,18 @@ ...@@ -1071,12 +1071,18 @@
}, },
{ {
"__id__": 81 "__id__": 81
},
{
"__id__": 83
},
{
"__id__": 90
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 83 "__id__": 97
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3941,61 +3947,22 @@ ...@@ -3941,61 +3947,22 @@
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "90lLVYuItAwohmPV+CWljy" "_id": "90lLVYuItAwohmPV+CWljy"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_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": 1280,
"_originalHeight": 720,
"_id": "c87OiuHMRI7YOL5SUoikbx"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "ConsoleNode", "_name": "BtnOpenOsmo",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 22
}, },
"_children": [ "_children": [
{ {
"__id__": 85 "__id__": 84
},
{
"__id__": 91
},
{
"__id__": 94
},
{
"__id__": 102
},
{
"__id__": 110
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 118 "__id__": 89
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4009,20 +3976,20 @@ ...@@ -4009,20 +3976,20 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1280, "width": 150,
"height": 220 "height": 40
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0 "y": 0.5
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 433.571,
-360, 81.418,
0, 0,
0, 0,
0, 0,
...@@ -4044,27 +4011,27 @@ ...@@ -4044,27 +4011,27 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "91+HZOZlJKdr+t1XzkQEKe" "_id": "32Gap6EZ1F3J3DtoN1UGtK"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "content", "_name": "Background",
"_objFlags": 0, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 84 "__id__": 83
}, },
"_children": [ "_children": [
{ {
"__id__": 86 "__id__": 85
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 89 "__id__": 87
}, },
{ {
"__id__": 90 "__id__": 88
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4078,8 +4045,8 @@ ...@@ -4078,8 +4045,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1280, "width": 150,
"height": 18.9 "height": 40
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -4091,7 +4058,7 @@ ...@@ -4091,7 +4058,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
15.75, 0,
0, 0,
0, 0,
0, 0,
...@@ -4113,49 +4080,46 @@ ...@@ -4113,49 +4080,46 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "24BhaxEGlK97fUByzahNNA" "_id": "c85nYyaM1Ce7w9p51WSJYS"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "label", "_name": "Label",
"_objFlags": 0, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 85 "__id__": 84
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 87 "__id__": 86
},
{
"__id__": 88
} }
], ],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 0,
"g": 255, "g": 0,
"b": 255, "b": 0,
"a": 255 "a": 255
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 36.7, "width": 150,
"height": 18.9 "height": 40
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0.5,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-627.765, 0,
0, 0,
0, 0,
0, 0,
...@@ -4178,14 +4142,14 @@ ...@@ -4178,14 +4142,14 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "a8JlHXNoVMIYa8iO8V9pJv" "_id": "c16T4d9ZNFyIMYefTOWVbu"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 86 "__id__": 85
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4195,11 +4159,11 @@ ...@@ -4195,11 +4159,11 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "Label", "_string": "OpenOSMO",
"_N$string": "Label", "_N$string": "OpenOSMO",
"_fontSize": 15, "_fontSize": 20,
"_lineHeight": 15, "_lineHeight": 40,
"_enableWrapText": true, "_enableWrapText": false,
"_N$file": null, "_N$file": null,
"_isSystemFontUsed": true, "_isSystemFontUsed": true,
"_spacingX": 0, "_spacingX": 0,
...@@ -4209,80 +4173,53 @@ ...@@ -4209,80 +4173,53 @@
"_N$horizontalAlign": 1, "_N$horizontalAlign": 1,
"_N$verticalAlign": 1, "_N$verticalAlign": 1,
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 1,
"_N$cacheMode": 0, "_N$cacheMode": 1,
"_id": "7aWnUU64NC5YnWWToB9L2S" "_id": "28Y+PWlgVGErDjYwL/fbjM"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_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": "78IPqSab1KQrGbP3jz8URO"
}, },
{ {
"__type__": "cc.Layout", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 85 "__id__": 84
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_materials": [
"__type__": "cc.Size", {
"width": 1280, "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"height": 18.9 }
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
}, },
"_resize": 1, "_type": 1,
"_N$layoutType": 2, "_sizeMode": 0,
"_N$cellSize": { "_fillType": 0,
"__type__": "cc.Size", "_fillCenter": {
"width": 40, "__type__": "cc.Vec2",
"height": 40 "x": 0,
"y": 0
}, },
"_N$startAxis": 0, "_fillStart": 0,
"_N$paddingLeft": 0, "_fillRange": 0,
"_N$paddingRight": 0, "_isTrimmedMode": true,
"_N$paddingTop": 0, "_atlas": null,
"_N$paddingBottom": 0, "_id": "975ioONQNOsLYhnmJo2ZRH"
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "a7sD/OZvVFbrIQDw6dexDk"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 85 "__id__": 84
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 0,
"_target": null, "_target": null,
"_alignFlags": 40, "_alignFlags": 45,
"_left": 0, "_left": 0,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
...@@ -4295,44 +4232,855 @@ ...@@ -4295,44 +4232,855 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 300, "_originalWidth": 100,
"_originalHeight": 0, "_originalHeight": 40,
"_id": "2diCJWUqhAcJPg/A28mr9e" "_id": "70ipBYFJdFXIvYAyxODnJr"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Button",
"_name": "bg", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 84 "__id__": 83
}, },
"_children": [], "_enabled": true,
"_active": false, "_normalMaterial": null,
"_components": [ "_grayMaterial": null,
{ "duration": 0.1,
"__id__": 92 "zoomScale": 1.2,
}, "clickEvents": [],
{ "_N$interactable": true,
"__id__": 93 "_N$enableAutoGrayEffect": false,
} "_N$transition": 2,
], "transition": 2,
"_prefab": null, "_N$normalColor": {
"_opacity": 138,
"_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 81, "r": 230,
"g": 81, "g": 230,
"b": 81, "b": 230,
"a": 255 "a": 255
}, },
"_contentSize": { "_N$pressedColor": {
"__type__": "cc.Size", "__type__": "cc.Color",
"width": 1280, "r": 200,
"height": 220 "g": 200,
"b": 200,
"a": 255
}, },
"_anchorPoint": { "pressedColor": {
"__type__": "cc.Vec2", "__type__": "cc.Color",
"x": 0.5, "r": 200,
"g": 200,
"b": 200,
"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": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 84
},
"_id": "d3D8175pRBQIg3kZC6RPpq"
},
{
"__type__": "cc.Node",
"_name": "BtnCloseOsmo",
"_objFlags": 0,
"_parent": {
"__id__": 22
},
"_children": [
{
"__id__": 91
}
],
"_active": true,
"_components": [
{
"__id__": 96
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
435.629,
-29.71,
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": "64Kn4xGW9PSJqoZ7ayrgZu"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 90
},
"_children": [
{
"__id__": 92
}
],
"_active": true,
"_components": [
{
"__id__": 94
},
{
"__id__": 95
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 40
},
"_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": "a4atTysq5MZYXuAR7OPR0B"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 93
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 40
},
"_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": "161xkiPIJCR6CwZaUCvBUI"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "CloseOSMO",
"_N$string": "CloseOSMO",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 1,
"_id": "a8iSQfSjVF7qGfo3hxji7I"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "69ZlIcwzJN5oHS5d/ktceg"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
},
"_enabled": true,
"alignMode": 0,
"_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": 40,
"_id": "58WyKrehVLu4r0ukhirvsu"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 2,
"transition": 2,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 230,
"g": 230,
"b": 230,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"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": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 91
},
"_id": "27BjR9SvZAhY/aQBzv9ezW"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_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": 1280,
"_originalHeight": 720,
"_id": "c87OiuHMRI7YOL5SUoikbx"
},
{
"__type__": "cc.Node",
"_name": "ConsoleNode",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 99
},
{
"__id__": 105
},
{
"__id__": 108
},
{
"__id__": 116
},
{
"__id__": 124
}
],
"_active": true,
"_components": [
{
"__id__": 132
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 220
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-360,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "91+HZOZlJKdr+t1XzkQEKe"
},
{
"__type__": "cc.Node",
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 98
},
"_children": [
{
"__id__": 100
}
],
"_active": false,
"_components": [
{
"__id__": 103
},
{
"__id__": 104
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 18.9
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
15.75,
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": "24BhaxEGlK97fUByzahNNA"
},
{
"__type__": "cc.Node",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 99
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
},
{
"__id__": 102
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 36.7,
"height": 18.9
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-627.765,
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": "a8JlHXNoVMIYa8iO8V9pJv"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 15,
"_lineHeight": 15,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "7aWnUU64NC5YnWWToB9L2S"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_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": "78IPqSab1KQrGbP3jz8URO"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 18.9
},
"_resize": 1,
"_N$layoutType": 2,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 0,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "a7sD/OZvVFbrIQDw6dexDk"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 40,
"_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": 300,
"_originalHeight": 0,
"_id": "2diCJWUqhAcJPg/A28mr9e"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 98
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 106
},
{
"__id__": 107
}
],
"_prefab": null,
"_opacity": 138,
"_color": {
"__type__": "cc.Color",
"r": 81,
"g": 81,
"b": 81,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 220
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
...@@ -4369,7 +5117,7 @@ ...@@ -4369,7 +5117,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 91 "__id__": 105
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4401,7 +5149,7 @@ ...@@ -4401,7 +5149,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 91 "__id__": 105
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -4428,26 +5176,26 @@ ...@@ -4428,26 +5176,26 @@
"_name": "Console", "_name": "Console",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 84 "__id__": 98
}, },
"_children": [ "_children": [
{ {
"__id__": 95 "__id__": 109
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 98 "__id__": 112
}, },
{ {
"__id__": 99 "__id__": 113
}, },
{ {
"__id__": 100 "__id__": 114
}, },
{ {
"__id__": 101 "__id__": 115
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4503,16 +5251,16 @@ ...@@ -4503,16 +5251,16 @@
"_name": "content", "_name": "content",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 94 "__id__": 108
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 96 "__id__": 110
}, },
{ {
"__id__": 97 "__id__": 111
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4568,7 +5316,7 @@ ...@@ -4568,7 +5316,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 95 "__id__": 109
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -4600,7 +5348,7 @@ ...@@ -4600,7 +5348,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 95 "__id__": 109
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -4627,7 +5375,7 @@ ...@@ -4627,7 +5375,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 108
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 2,
...@@ -4654,7 +5402,7 @@ ...@@ -4654,7 +5402,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 108
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4674,7 +5422,7 @@ ...@@ -4674,7 +5422,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 108
}, },
"_enabled": true, "_enabled": true,
"horizontal": false, "horizontal": false,
...@@ -4686,10 +5434,10 @@ ...@@ -4686,10 +5434,10 @@
"scrollEvents": [], "scrollEvents": [],
"cancelInnerEvents": true, "cancelInnerEvents": true,
"_N$content": { "_N$content": {
"__id__": 95 "__id__": 109
}, },
"content": { "content": {
"__id__": 95 "__id__": 109
}, },
"_id": "43wBGhGBpFP7OYyNM+j0Ho" "_id": "43wBGhGBpFP7OYyNM+j0Ho"
}, },
...@@ -4698,7 +5446,7 @@ ...@@ -4698,7 +5446,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 108
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -4730,20 +5478,20 @@ ...@@ -4730,20 +5478,20 @@
"_name": "BtnClose", "_name": "BtnClose",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 84 "__id__": 98
}, },
"_children": [ "_children": [
{ {
"__id__": 103 "__id__": 117
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 108 "__id__": 122
}, },
{ {
"__id__": 109 "__id__": 123
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4799,20 +5547,20 @@ ...@@ -4799,20 +5547,20 @@
"_name": "Background", "_name": "Background",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 102 "__id__": 116
}, },
"_children": [ "_children": [
{ {
"__id__": 104 "__id__": 118
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 106 "__id__": 120
}, },
{ {
"__id__": 107 "__id__": 121
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4868,13 +5616,13 @@ ...@@ -4868,13 +5616,13 @@
"_name": "Label", "_name": "Label",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 103 "__id__": 117
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 105 "__id__": 119
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4930,7 +5678,7 @@ ...@@ -4930,7 +5678,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 104 "__id__": 118
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4963,7 +5711,7 @@ ...@@ -4963,7 +5711,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 103 "__id__": 117
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4995,7 +5743,7 @@ ...@@ -4995,7 +5743,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 103 "__id__": 117
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -5022,7 +5770,7 @@ ...@@ -5022,7 +5770,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 102 "__id__": 116
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -5095,7 +5843,7 @@ ...@@ -5095,7 +5843,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
}, },
"_N$target": { "_N$target": {
"__id__": 103 "__id__": 117
}, },
"_id": "54SC9WcmBAZ6cTznyI0o+3" "_id": "54SC9WcmBAZ6cTznyI0o+3"
}, },
...@@ -5104,7 +5852,7 @@ ...@@ -5104,7 +5852,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 102 "__id__": 116
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -5131,20 +5879,20 @@ ...@@ -5131,20 +5879,20 @@
"_name": "BtnOpen", "_name": "BtnOpen",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 84 "__id__": 98
}, },
"_children": [ "_children": [
{ {
"__id__": 111 "__id__": 125
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 116 "__id__": 130
}, },
{ {
"__id__": 117 "__id__": 131
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5200,20 +5948,20 @@ ...@@ -5200,20 +5948,20 @@
"_name": "Background", "_name": "Background",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 110 "__id__": 124
}, },
"_children": [ "_children": [
{ {
"__id__": 112 "__id__": 126
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 114 "__id__": 128
}, },
{ {
"__id__": 115 "__id__": 129
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5269,13 +6017,13 @@ ...@@ -5269,13 +6017,13 @@
"_name": "Label", "_name": "Label",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 111 "__id__": 125
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 113 "__id__": 127
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5331,7 +6079,7 @@ ...@@ -5331,7 +6079,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 112 "__id__": 126
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5364,7 +6112,7 @@ ...@@ -5364,7 +6112,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 111 "__id__": 125
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5396,7 +6144,7 @@ ...@@ -5396,7 +6144,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 111 "__id__": 125
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -5423,7 +6171,7 @@ ...@@ -5423,7 +6171,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 110 "__id__": 124
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -5496,7 +6244,7 @@ ...@@ -5496,7 +6244,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
}, },
"_N$target": { "_N$target": {
"__id__": 111 "__id__": 125
}, },
"_id": "81HoUuRyJOppi+n4Av/u0p" "_id": "81HoUuRyJOppi+n4Av/u0p"
}, },
...@@ -5505,7 +6253,7 @@ ...@@ -5505,7 +6253,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 110 "__id__": 124
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -5532,7 +6280,7 @@ ...@@ -5532,7 +6280,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 84 "__id__": 98
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
......
...@@ -9,9 +9,16 @@ export function initAir(_this) { ...@@ -9,9 +9,16 @@ export function initAir(_this) {
_this.log("***成功调用onCourseInScreen***"); _this.log("***成功调用onCourseInScreen***");
}); });
}, },
osmoCallback: null, osmoCallback: function(res){
osmoHandwritingCallback: null, _this.log(`***成功调用osmoCallback***参数==${res}`);
osmoFingerReadCallback: null, },
osmoHandwritingCallback: function(res){
_this.log(`***成功调用osmoHandwritingCallback***参数==${res}`);
},
osmoFingerReadCallback: function(res){
_this.log(`***成功调用osmoFingerReadCallback***参数==${res}`);
},
getEngineInfoCallback: null,
onCourseInScreen: null, onCourseInScreen: null,
} }
window.courseware = { window.courseware = {
...@@ -73,23 +80,51 @@ export function initAir(_this) { ...@@ -73,23 +80,51 @@ export function initAir(_this) {
_this.log(`===成功调用openRecognitionCamera===`); _this.log(`===成功调用openRecognitionCamera===`);
callback && callback(null); callback && callback(null);
}, },
getEngineInfo(callback) {
_this.log(`===成功调用getEngineInfo===`);
// 调用原生获取机器信息
window.air.getEngineInfoCallback = (res) => {
callback && callback(res);
window.air.getEngineInfoCallback = null;
};
this.callOcMethod("getEngineInfo", {});
},
openOsmo() { openOsmo() {
_this.log(`===成功调用openOsmo===`); _this.log(`===成功调用openOsmo===`);
this.callOcMethod("openOsmo", {});
}, },
closeOsmo() { closeOsmo() {
_this.log(`===成功调用closeOsmo===`); _this.log(`===成功调用closeOsmo===`);
this.callOcMethod("closeOsmo", {});
}, },
openOsmoHandwriting() { openOsmoHandwriting() {
_this.log(`===成功调用openOsmoHandwriting===`); _this.log(`===成功调用openOsmoHandwriting===`);
this.callOcMethod("openOsmoHandwriting", {});
}, },
closeOsmoHandwriting() { closeOsmoHandwriting() {
_this.log(`===成功调用closeOsmoHandwriting===`); _this.log(`===成功调用closeOsmoHandwriting===`);
this.callOcMethod("closeOsmoHandwriting", {});
}, },
openOsmoFingerRead() { openOsmoFingerRead() {
_this.log(`===成功调用openOsmoFingerRead===`); _this.log(`===成功调用openOsmoFingerRead===`);
this.callOcMethod("openOsmoFingerRead", {});
}, },
closeOsmoFingerRead() { closeOsmoFingerRead() {
_this.log(`===成功调用closeOsmoFingerRead===`); _this.log(`===成功调用closeOsmoFingerRead===`);
this.callOcMethod("closeOsmoFingerRead", {});
},
callOcMethod(method, param) {
const paramStr = JSON.stringify(param);
_this.log(`===成功调用原生方法${method}===参数==${paramStr}`);
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
return jsb.reflection.callStaticMethod('CocosMng', `${method}:`, paramStr);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod('com/iplayabc/cocos/AppActivity', method, '(Ljava/lang/String;)Ljava/lang/String;', paramStr);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_WINDOWS) {
console.log('汪汪汪')
} else {
throw ('非源生环境');
}
}, },
}; };
......
...@@ -106,6 +106,14 @@ cc.Class({ ...@@ -106,6 +106,14 @@ cc.Class({
this.goPrePage(); this.goPrePage();
}); });
cc.find('middleLayer/ui/BtnOpenOsmo').on('click', ()=>{
window.courseware.openOsmo();
});
cc.find('middleLayer/ui/BtnCloseOsmo').on('click', ()=>{
window.courseware.closeOsmo();
});
const BtnStartLocal = cc.find('middleLayer/ui/BtnStartLocal'); const BtnStartLocal = cc.find('middleLayer/ui/BtnStartLocal');
BtnStartLocal.on('click', () => { BtnStartLocal.on('click', () => {
const addressText = cc.find('middleLayer/ui/address'); const addressText = cc.find('middleLayer/ui/address');
......
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