Commit b18347c6 authored by 杨一航's avatar 杨一航

add

parent 1ac5fb5e
...@@ -63,6 +63,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -63,6 +63,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
private _catSpeaking: boolean; private _catSpeaking: boolean;
private _audioNode: cc.Node; private _audioNode: cc.Node;
private _canChosendCard: boolean = true; private _canChosendCard: boolean = true;
_wordData: { monkey: string[]; tiger: string[]; pencil: string[]; music: string[]; honey: string[]; baby: string[]; };
private _otherWord: any;
onLoad() { onLoad() {
...@@ -837,6 +839,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -837,6 +839,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.schedule(this.longTimeNoAction, 15, 6, 15) this.schedule(this.longTimeNoAction, 15, 6, 15)
this.cover.active = true; this.cover.active = true;
this.recordCat.active = false;
// this.cat.active = false; // this.cat.active = false;
this._clockNode.active = false; this._clockNode.active = false;
let probar = this.cover.getChildByName("bg").getChildByName("probar"); let probar = this.cover.getChildByName("bg").getChildByName("probar");
...@@ -861,7 +864,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -861,7 +864,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// }); // });
// }) // })
// } else { // } else {
this.recordCat.getComponent(dragonBones.ArmatureDisplay).playAnimation("record", 0); // this.recordCat.getComponent(dragonBones.ArmatureDisplay).playAnimation("record", 0);
// } // }
this._startCourseware(); this._startCourseware();
...@@ -901,6 +904,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -901,6 +904,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
this.log("++++++++++++ _coursewareEnd +++++++++++++++"); this.log("++++++++++++ _coursewareEnd +++++++++++++++");
this.log("发音=== " + res.text); this.log("发音=== " + res.text);
this._coursewareEnd(res.text) this._coursewareEnd(res.text)
}); });
} else { } else {
...@@ -913,9 +918,65 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -913,9 +918,65 @@ export default class SceneComponent extends MyCocosSceneComponent {
async _coursewareEnd(text: string) { async _coursewareEnd(text: string) {
this.cover.active = false; this.cover.active = false;
this.log(text) let strs: Array<string> = this._wordData[this._otherWord];
if (strs.indexOf(text)) {
this.pp.getChildByName("lb").getComponent(cc.Label).string = "Yes";
} else {
this.pp.getChildByName("lb").getComponent(cc.Label).string = "No";
}
let tips = `点击气泡框按照下列方式问:
Is your word (正确单词)
Can you eat it?
It is (颜色)?
It is a/an animal/fruit?`;
asyncDelay(2).then(() => {
this.pp.getChildByName("lb").getComponent(cc.Label).string = tips;
})
} }
initwordAnswerData() {
this._wordData = {
monkey: [
"Is your word monkey",
"Is it brown",
"Is it an animal",
],
tiger: [
"Is your word tiger",
"Is it orange",
"Is it black and orange",
"Is it orange and black",
"Is it an animal",
],
pencil: [
"Is your word pencil",
"Is it yellow",
"Is it an animal",
],
music: [
"Is your word music",
"Is it black",
],
honey: [
"Is your word honey",
"Is it orange",
"Is it yellow",
"Is it brown",
"Is it a fruit",
"Can you eat it",
],
baby: [
"Is your word baby",
"Is it bule",
"Is it green",
],
}
}
finish() { finish() {
// onHomeworkFinish(); // onHomeworkFinish();
......
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