Commit b1186fea authored by yu's avatar yu

1

parent b96a6eff
...@@ -189,7 +189,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -189,7 +189,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
data.wordArr.forEach(async (dt) => { data.wordArr.forEach(async (dt) => {
let item = isBig ? cc.instantiate(this.item4) : cc.instantiate(this.item3); let item = isBig ? cc.instantiate(this.item4) : cc.instantiate(this.item3);
let word = cc.find("word", item); let word = cc.find("word", item);
let xian = cc.find("xian", item); let box1 = cc.find("box1", item);
// let xian = cc.find("xian", item);
word.getComponent(cc.Label).string = dt.text.split(" ").join(""); word.getComponent(cc.Label).string = dt.text.split(" ").join("");
item.active = true; item.active = true;
item.parent = this.layout_up; item.parent = this.layout_up;
...@@ -201,8 +202,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -201,8 +202,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
item.width = word.width + 30; item.width = word.width + 30;
} }
if (dt.block) { if (dt.block) {
if (xian) xian.active = true; // if (xian) xian.active = true;
word.getComponent(cc.Label).string = ""; word.getComponent(cc.Label).string = "";
} else {
if (box1) box1.active = true;
} }
}) })
this.layout_up.active = true; this.layout_up.active = true;
...@@ -236,7 +239,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -236,7 +239,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// this.layout_down.getComponent(cc.Layout).spacingX = 70; // this.layout_down.getComponent(cc.Layout).spacingX = 70;
} else { } else {
// this.layout_down.getComponent(cc.Layout).spacingX = -100; // this.layout_down.getComponent(cc.Layout).spacingX = -100;
this.layout_up.getComponent(cc.Layout).spacingX = 10; this.layout_up.getComponent(cc.Layout).spacingX = 0;
} }
this.layout_up.getComponent(cc.Sprite).enabled = data.wordArr.length > 5; this.layout_up.getComponent(cc.Sprite).enabled = data.wordArr.length > 5;
...@@ -356,7 +359,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -356,7 +359,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.playLocalAudio("right"); this.playLocalAudio("right");
cc.Tween.stopAllByTarget(data.parent); cc.Tween.stopAllByTarget(data.parent);
data.parent.setPosition(data.parentPos); // data.parent.setPosition(data.parentPos);
let word = cc.find("word", itemBg); let word = cc.find("word", itemBg);
......
export const defaultData = { export const defaultData = {
"npcTitle": "tiankong", "npcTitle": "tiankong",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/944ae51b57fb9390dd03104d9651e5f4_l.mp3", "npcAudio": "",
// "npcAudio": "http://staging-teach.cdn.ireadabc.com/944ae51b57fb9390dd03104d9651e5f4_l.mp3",
"npcAudioName": "bear_2.mp3", "npcAudioName": "bear_2.mp3",
"title": "排序组句", "title": "排序组句",
"questions": [ "questions": [
...@@ -23,7 +24,8 @@ export const defaultData = { ...@@ -23,7 +24,8 @@ export const defaultData = {
"check": 1 "check": 1
} }
], ],
"audio": "http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3", "audio": "",
// "audio": "http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3",
"contentMain": "what is\n your name?", "contentMain": "what is\n your name?",
"text": "", "text": "",
"audioName": "bear_1.mp3" "audioName": "bear_1.mp3"
......
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