游戏结果增加返回剩余时间

This commit is contained in:
zhl 2021-05-12 18:05:14 +08:00
parent dcf7a0be44
commit 33ec0caf9d
3 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,7 @@
"maxCombo": 1, // 当局连续答对的最大数量 "maxCombo": 1, // 当局连续答对的最大数量
"score": 10, // 当局胜利后的得分 "score": 10, // 当局胜利后的得分
"star": 1, // 当局胜利后获得的星星 "star": 1, // 当局胜利后获得的星星
"timeLeft": 1, // 当局剩余时间
"gameResult": 0 // 当局的游戏结果, 单人的话和上一层gameResult相同 "gameResult": 0 // 当局的游戏结果, 单人的话和上一层gameResult相同
} }
} }

View File

@ -53,6 +53,9 @@ export class PuzzleStatusClass {
@prop({default: 0}) @prop({default: 0})
star: number star: number
@prop()
timeLeft: number
/** /**
* *
* @type {number} * @type {number}

View File

@ -216,6 +216,7 @@ export function calcSingleScore(history: any, accountId: string) {
(stat.maxCombo >= cfgLevel.enemystar) && star++; (stat.maxCombo >= cfgLevel.enemystar) && star++;
(hp >= cfgLevel.hpstar) && star ++; (hp >= cfgLevel.hpstar) && star ++;
stat.star = star stat.star = star
stat.timeLeft = time
return { score, star } return { score, star }
} }