游戏结果增加返回剩余时间
This commit is contained in:
parent
dcf7a0be44
commit
33ec0caf9d
@ -93,7 +93,8 @@
|
||||
"comboCount": 0, // 当前连续答对的数量
|
||||
"maxCombo": 1, // 当局连续答对的最大数量
|
||||
"score": 10, // 当局胜利后的得分
|
||||
"star": 1, // 当局胜利后获得的星星
|
||||
"star": 1, // 当局胜利后获得的星星
|
||||
"timeLeft": 1, // 当局剩余时间
|
||||
"gameResult": 0 // 当局的游戏结果, 单人的话和上一层gameResult相同
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ export class PuzzleStatusClass {
|
||||
@prop({default: 0})
|
||||
star: number
|
||||
|
||||
@prop()
|
||||
timeLeft: number
|
||||
|
||||
/**
|
||||
* 游戏结果
|
||||
* @type {number}
|
||||
|
@ -216,6 +216,7 @@ export function calcSingleScore(history: any, accountId: string) {
|
||||
(stat.maxCombo >= cfgLevel.enemystar) && star++;
|
||||
(hp >= cfgLevel.hpstar) && star ++;
|
||||
stat.star = star
|
||||
stat.timeLeft = time
|
||||
return { score, star }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user