Commit 8c2e51db authored by liujiangnan's avatar liujiangnan

debug

parent b7be153b
......@@ -1365,7 +1365,7 @@
"__id__": 5
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 29
......@@ -2451,7 +2451,7 @@
"__id__": 45
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 49
......@@ -2632,7 +2632,7 @@
"__id__": 45
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 53
......@@ -2907,7 +2907,7 @@
"__id__": 45
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 59
......@@ -3001,7 +3001,7 @@
"__id__": 45
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 61
......@@ -3182,7 +3182,7 @@
"__id__": 45
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 65
......@@ -3363,7 +3363,7 @@
"__id__": 45
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 69
......@@ -4977,7 +4977,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "1bkPsMXfFOgI5nesFGYJZm"
"_id": "1f/1wwfpJKz7oRaAt1i5eg"
},
{
"__type__": "cc.Label",
......@@ -5012,7 +5012,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "b8SsUATeVO3bqxJZtzowZR"
"_id": "88i6iWfHJDmrVUzD2Pnpoj"
},
{
"__type__": "cc.RichText",
......
......@@ -55,16 +55,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.recording.zIndex = 999
this.recording.active = false
// this.setcoordinate(this.recording)
this.recording.getChildByName("stop").active = false
this.recording.getChildByName("start").active = true;
this.recording.getChildByName("good").active = false
this.recording.getChildByName("Try").active = false
this.recording.getChildByName("DB").active = true
this.recording.getChildByName("again").active = false
this.recording.getChildByName("skip").active = false
this.gameStart();
}
onSizeChanged() {
cc.director.loadScene(cc.director.getScene().name);
......@@ -240,32 +235,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
soundcount = 0
recordingEvent(e, state) {
this.playAudio("btn");
if (state == "0") {//
this.recording.getChildByName("stop").active = true
this.recording.getChildByName("start").active = false;
(<any>window).courseware && (<any>window).courseware.startTest(this.answerRightarr[0])
if ("" == this.answerRightarr[0]) {
this.recording.getChildByName("Label").getComponent(cc.Label).string = "配置文件text字段是空"
} else {
this.recording.getChildByName("Label").getComponent(cc.Label).string = ""
}
console.log('this.answerRightarr', this.answerRightarr);
} else {
let self = this
if ((<any>window).courseware) {
(<any>window).courseware.stopTest((res) => { // 这里面是一个评测对象,里面有各种维度的评分
this.log("这里面是一个评测对象,回调评分结果>>>" + res)
let str = JSON.parse(res)
this.conclusion(str.result.overall)
});
} else {
this.conclusion(6)
}
this.log("完成====");
}
}
conclusion(grade) {
......@@ -275,38 +246,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else {
this.recording.getChildByName("Try").active = true
this.playAudio("again")
this.soundcount++
if (this.soundcount <= 1) {
this.scheduleOnce(() => {
if(!this.node.isValid)return
this.recording.getChildByName("Try").active = false
this.recording.getChildByName("stop").active = false
this.recording.getChildByName("start").active = true;
}, 2)
} else {
this.scheduleOnce(() => {
if(!this.node.isValid)return
this.recording.getChildByName("Try").active = true
this.recording.getChildByName("stop").active = false
this.recording.getChildByName("DB").active = false
this.recording.getChildByName("again").active = true
this.recording.getChildByName("skip").active = true
}, 2)
}
return
}
this.recording.getChildByName("DB").active = false
this.recording.getChildByName("stop").active = false
this.recording.getChildByName("start").active = false;
this.scheduleOnce(() => {
if(!this.node.isValid)return
this.recording.active = false
this.recording.getChildByName("start").active = true;
this.recording.getChildByName("good").active = false
this.recording.getChildByName("Try").active = false
this.recording.getChildByName("DB").active = true
this.recording.getChildByName("again").active = false
this.recording.getChildByName("skip").active = false
this.over()
}, 2)
}
......@@ -324,15 +271,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
operation(e, state) {
this.playAudio("btn");
this.recording.getChildByName("start").active = true;
this.recording.getChildByName("good").active = false
this.recording.getChildByName("Try").active = false
this.recording.getChildByName("DB").active = true
this.recording.getChildByName("again").active = false
this.recording.getChildByName("skip").active = false
if (state == "0") {//再来一次
} else {//跳过 继续游戏
this.soundcount = 0
this.recording.active = false
this.over()
}
......@@ -394,21 +337,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.log("打完了=============")
this.stopShowBalls();
await asyncDelay(2);
// await this.showStar();
// this._status.currentRightNumber = 0;
// this._status.currentQuestionIdx++;
// if (this.isEndGame()) {
// this.onGameEnd();
// } else {
// await asyncDelay(1.5);
// await this.playQuestionAudio();
// this.startShowBalls();
// }
this.recording.active = true
this.soundcount = 0
this.playAudio("tishi")
this.recording.active = true;
await this.autoRecording();
}
});
......@@ -429,6 +359,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
return ball;
}
async autoRecording() {
const courseware = (<any>window).courseware;
if (!courseware) {
this.conclusion(6);
return;
}
courseware.startTest(this.answerRightarr[0]);
await asyncDelay(5);
courseware.stopTest((res) => { // 这里面是一个评测对象,里面有各种维度的评分
let str = JSON.parse(res)
this.conclusion(str.result.overall)
});
}
onBallClicked(answer) {
}
......
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