Commit 69be4f1e authored by liujiangnan's avatar liujiangnan

feat

parent 4bf16588
......@@ -286,8 +286,6 @@ cc.Class({
this._flyswatter.y = pos.y;
this._touched = false;
playDragonBoneAnimation(this._flyswatter.children[0], 'normal');
let astr = this.flyVirus[i]._text.string;
let isRight = this.flyVirus[i]._isRight;
item._dizzy_ani = cc.tween(this._flyswatter)
//.delay(0.2)
.call(() => {
......@@ -301,11 +299,9 @@ cc.Class({
console.log(this._correct_index + "->" + i);
if (i != this._correct_index) {
console.log('hit err');
this.sendAnswer(astr);
this.fallCare(false);
} else {
console.log('hit ok');
this.sendAnswer(astr, true);
this.fallCare(true);
}
})
......@@ -391,7 +387,6 @@ cc.Class({
.to(this._current_time, { x: 0 })
.call(() => {
this.flyOut();
this.sendAnswer();
})
.start();
......@@ -628,15 +623,9 @@ cc.Class({
gameEnd() {
if (window && window.courseware) {
window.courseware.gameEnd();
}
},
sendAnswer(answer = "", isRight = false) {
console.log(this._aiexerciseid, answer, isRight, this._startTime);
// alert(answer);
if (window && window.courseware) {
window.courseware.sendAnswer(this._aiexerciseid, answer, isRight, this._startTime);
// 游戏结束
// TODO 上报成绩
window.courseware.nextPage();
}
},
......
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