Commit 69be4f1e authored by liujiangnan's avatar liujiangnan

feat

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