Commit 5b3d11a5 authored by limingzhe's avatar limingzhe

feat: 上报数据

parent 3fd217d3
No preview for this file type
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
......@@ -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