Commit d6b6c81b authored by Guo Yuhang's avatar Guo Yuhang

Merge branch 'master' of http://vcs.ireadabc.com/template/OP05

parents ae56a636 5b3d11a5
......@@ -180,10 +180,12 @@ cc.Class({
//全局游戏
_gameCode: null,
resultArr: null,
initData() {
//数据解析
GameManager.getIns().parseData(this.data);
this._gameCode = 0;
this.resultArr = [];
},
//单局游戏
_cantouch: null,
......@@ -487,7 +489,9 @@ cc.Class({
// this.playSFX("audio_finish");
// pg.view.visible(btn_picture, true);
pg.view.visible(btn_record, false);
onHomeworkFinish && onHomeworkFinish();
console.log('this.resultArr: ', JSON.stringify(this.resultArr));
onHomeworkFinish && onHomeworkFinish({result: this.resultArr});
},
playPartAni() {
......@@ -696,6 +700,7 @@ cc.Class({
},
recrodEnd(data) {
let score = data.result.overall;
this._stageData.curScore = score;
// score = (score / 100) * 40 + (100 - 40);
// score = 40;
if (score >= 80) {
......@@ -750,6 +755,9 @@ cc.Class({
nextStage() {
let isOver = GameManager.getIns().addStage();//关卡标记+1
this.pushResultData();
if (isOver) {
//执行总结束的内容
GameManager.getIns().setState(5);
......@@ -760,6 +768,13 @@ cc.Class({
}
},
pushResultData() {
console.log(' in pushResultData');
const word = this._stageData.word;
const score = this._stageData.curScore;
this.resultArr.push( {word, score} );
},
......
This diff is collapsed.
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