Commit 4388318f authored by Tt's avatar Tt

调整需求

parent 656979e6
......@@ -289,9 +289,6 @@
{
"__id__": 50
},
{
"__id__": 53
},
{
"__id__": 55
}
......@@ -2465,14 +2462,18 @@
"_parent": {
"__id__": 5
},
"_children": [],
"_children": [
{
"__id__": 51
}
],
"_active": true,
"_components": [
{
"__id__": 51
"__id__": 53
},
{
"__id__": 52
"__id__": 54
}
],
"_prefab": null,
......@@ -2523,6 +2524,100 @@
"groupIndex": 0,
"_id": "977Zla+vpGmpD8y2lqL226"
},
{
"__type__": "cc.Node",
"_name": "la_layout",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 52
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 124.6,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-16.686,
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": "0cA2rTLH5GB4a22UQMyjgM"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 124.6,
"height": 200
},
"_resize": 1,
"_N$layoutType": 1,
"_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": 100,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "9bBKJpxXNCG6JBLAg98JUf"
},
{
"__type__": "cc.Sprite",
"_name": "",
......@@ -2593,7 +2688,7 @@
"_active": true,
"_components": [
{
"__id__": 54
"__id__": 56
}
],
"_prefab": null,
......@@ -2619,8 +2714,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-16.686,
629.85,
-16.685999999999922,
629.8499999999999,
0,
0,
0,
......@@ -2649,7 +2744,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
"__id__": 55
},
"_enabled": true,
"_materials": [
......@@ -2679,100 +2774,6 @@
"_N$cacheMode": 0,
"_id": "f3aCXfwJpAEbg2UPj/vUwK"
},
{
"__type__": "cc.Node",
"_name": "la_layout",
"_objFlags": 0,
"_parent": {
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 124.6,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-16.686,
629.85,
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": "0cA2rTLH5GB4a22UQMyjgM"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 124.6,
"height": 200
},
"_resize": 1,
"_N$layoutType": 1,
"_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": 100,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "9bBKJpxXNCG6JBLAg98JUf"
},
{
"__type__": "cc.Widget",
"_name": "",
......
......@@ -170,6 +170,15 @@ cc.Class({
//TODO:copy
this.hideFlower();
const box = cc.find('Canvas/bg/box');
box.removeAllChildren();
const box_mid = cc.find('Canvas/bg/box_mid');
box_mid.removeAllChildren();
let group1 = cc.find('Canvas/bg/group1');
group1.removeAllChildren();
let group2 = cc.find('Canvas/bg/group2');
group2.removeAllChildren();
this.coolCatSpeakStart(() => {
this.showSubmitBtn();
this.jumpToQuestion(this.status.currentQuestionIdx);
......@@ -202,18 +211,21 @@ cc.Class({
let group2 = cc.find('Canvas/bg/group2');
group2.removeAllChildren();
let la_layout = cc.find("Canvas/bg/la_layout");
let la_layout = cc.find("Canvas/bg/paizi/la_layout");
la_layout.removeAllChildren();
let desc = cc.find("Canvas/bg/desc");
const optiontext = this.data.question_arr[questionIdx].desc1;
const optiontext2 = this.data.question_arr[questionIdx].desc2;
let textArr = [optiontext, optiontext2];
textArr.forEach((item) => {
if (!item || item == "") return;
let d = cc.instantiate(desc);
d.getComponent(cc.Label).string = item;
la_layout.addChild(d);
d.y = 0;
})
let paizi = cc.find("Canvas/bg/paizi");
paizi.active = la_layout.children.length > 0;
let size = cc.view.getCanvasSize();
let scale = (size.width / size.height) / (1280 / 720);
group2.getComponent(cc.Layout).spacingX = scale < 1 ? 75 * scale : 85;
......
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