Commit 86714bfe authored by liujiangnan's avatar liujiangnan

feat

parent 47c38f7f
......@@ -84,19 +84,19 @@
"__id__": 30
},
{
"__id__": 49
"__id__": 51
}
],
"_active": true,
"_components": [
{
"__id__": 70
"__id__": 72
},
{
"__id__": 71
"__id__": 73
},
{
"__id__": 72
"__id__": 74
}
],
"_prefab": null,
......@@ -1385,15 +1385,18 @@
},
{
"__id__": 43
},
{
"__id__": 47
}
],
"_active": true,
"_components": [
{
"__id__": 47
"__id__": 49
},
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
......@@ -1989,7 +1992,7 @@
"__id__": 30
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 44
......@@ -2160,6 +2163,100 @@
"handler": "goRestart",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "btn_again_dis",
"_objFlags": 0,
"_parent": {
"__id__": 30
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 48
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 59,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
146.087,
3.652,
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": "14wNlCyNhPf7IxVaFp4nQH"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "745d21b5-2a0f-4a0e-ba58-d235bb05c3c8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "812Z41kMtPX7hAXQCuNtOE"
},
{
"__type__": "cc.Sprite",
"_name": "",
......@@ -2228,10 +2325,7 @@
},
"_children": [
{
"__id__": 50
},
{
"__id__": 53
"__id__": 52
},
{
"__id__": 55
......@@ -2240,19 +2334,22 @@
"__id__": 57
},
{
"__id__": 60
"__id__": 59
},
{
"__id__": 63
"__id__": 62
},
{
"__id__": 66
"__id__": 65
},
{
"__id__": 68
}
],
"_active": false,
"_components": [
{
"__id__": 69
"__id__": 71
}
],
"_prefab": null,
......@@ -2308,16 +2405,16 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 51
"__id__": 53
},
{
"__id__": 52
"__id__": 54
}
],
"_prefab": null,
......@@ -2373,7 +2470,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 52
},
"_enabled": true,
"_materials": [
......@@ -2405,7 +2502,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 52
},
"_enabled": true,
"alignMode": 1,
......@@ -2432,13 +2529,13 @@
"_name": "startbg",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 54
"__id__": 56
}
],
"_prefab": null,
......@@ -2494,7 +2591,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
"__id__": 55
},
"_enabled": true,
"_materials": [
......@@ -2526,13 +2623,13 @@
"_name": "desc",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 58
}
],
"_prefab": null,
......@@ -2588,7 +2685,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
"__id__": 57
},
"_enabled": true,
"_materials": [
......@@ -2623,16 +2720,16 @@
"_name": "continue",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 58
"__id__": 60
},
{
"__id__": 59
"__id__": 61
}
],
"_prefab": null,
......@@ -2688,7 +2785,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
"__id__": 59
},
"_enabled": true,
"_materials": [
......@@ -2720,7 +2817,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
"__id__": 59
},
"_enabled": true,
"_normalMaterial": null,
......@@ -2788,16 +2885,16 @@
"_name": "leave",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 63
},
{
"__id__": 62
"__id__": 64
}
],
"_prefab": null,
......@@ -2853,7 +2950,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
"__id__": 62
},
"_enabled": true,
"_materials": [
......@@ -2885,7 +2982,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
"__id__": 62
},
"_enabled": true,
"_normalMaterial": null,
......@@ -2953,16 +3050,16 @@
"_name": "btn_bl",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 64
"__id__": 66
},
{
"__id__": 65
"__id__": 67
}
],
"_prefab": null,
......@@ -3018,7 +3115,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 65
},
"_enabled": true,
"_materials": [
......@@ -3050,7 +3147,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 65
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3118,16 +3215,16 @@
"_name": "btn_zcdt",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 67
"__id__": 69
},
{
"__id__": 68
"__id__": 70
}
],
"_prefab": null,
......@@ -3183,7 +3280,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
"__id__": 68
},
"_enabled": true,
"_materials": [
......@@ -3215,7 +3312,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
"__id__": 68
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3283,7 +3380,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 49
"__id__": 51
},
"_enabled": true,
"alignMode": 1,
......
......@@ -33,6 +33,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
window["courseware"].getAnswer(null, ans => {
if (ans) {
this.isOver = JSON.parse(ans).isOver;
if (this.isOver) {
cc.find(`Canvas/btnbg/btn_again`).active = true;
cc.find(`Canvas/btnbg/btn_again_dis`).active = false;
}
const pic = cc.find(`Canvas/border/pic_bg/picture`);
getSpriteFrimeByUrl(JSON.parse(ans).pic_url, (frame) => {
pic.getComponent(cc.Sprite).spriteFrame = frame;
......@@ -65,9 +69,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
initView() {
this.initBg();
window["cameraHandler"].takePictureCallback = (err, url) => {
if (err) {
console.log(err);
......@@ -85,6 +86,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.hideLoading();
});
}
}
initBg() {
......
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