|
|
@ -163,8 +163,8 @@ |
|
|
cards: [], |
|
|
cards: [], |
|
|
slots: [], |
|
|
slots: [], |
|
|
slotLimit: 7, |
|
|
slotLimit: 7, |
|
|
timeLimit: 180, |
|
|
timeLimit: 300, |
|
|
timeLeft: 180, |
|
|
timeLeft: 300, |
|
|
timer: null, |
|
|
timer: null, |
|
|
roundSeed: '', |
|
|
roundSeed: '', |
|
|
moveCount: 0, |
|
|
moveCount: 0, |
|
|
@ -228,7 +228,7 @@ |
|
|
return cells |
|
|
return cells |
|
|
}, |
|
|
}, |
|
|
timerText() { |
|
|
timerText() { |
|
|
return this.playing ? `${this.timeLeft}s` : '180s限时' |
|
|
return this.playing ? `${this.timeLeft}s` : '300s限时' |
|
|
}, |
|
|
}, |
|
|
timerPercent() { |
|
|
timerPercent() { |
|
|
return Math.max(0, Math.min(100, Math.round(this.timeLeft * 100 / this.timeLimit))) |
|
|
return Math.max(0, Math.min(100, Math.round(this.timeLeft * 100 / this.timeLimit))) |
|
|
@ -243,7 +243,7 @@ |
|
|
if (!this.playing) return '开始后进入倒计时' |
|
|
if (!this.playing) return '开始后进入倒计时' |
|
|
if (this.timeLeft <= 30) return '最后冲刺,槽位别满' |
|
|
if (this.timeLeft <= 30) return '最后冲刺,槽位别满' |
|
|
if (this.timeLeft <= 60) return '时间紧张,加快决策' |
|
|
if (this.timeLeft <= 60) return '时间紧张,加快决策' |
|
|
return '180秒内完成助推' |
|
|
return '300秒内完成助推' |
|
|
}, |
|
|
}, |
|
|
riskText() { |
|
|
riskText() { |
|
|
if (this.slots.length >= this.slotLimit - 1) return '危险:差1格就满' |
|
|
if (this.slots.length >= this.slotLimit - 1) return '危险:差1格就满' |
|
|
@ -277,7 +277,7 @@ |
|
|
const elapsed = Math.floor((Date.now() - this.startTs) / 1000) |
|
|
const elapsed = Math.floor((Date.now() - this.startTs) / 1000) |
|
|
this.timeLeft = Math.max(0, this.timeLimit - elapsed) |
|
|
this.timeLeft = Math.max(0, this.timeLimit - elapsed) |
|
|
if (this.timeLeft <= 0) { |
|
|
if (this.timeLeft <= 0) { |
|
|
this.failLevel('时间到了', '超过180秒,本关失败。不消耗次数,调整顺序再来一次。') |
|
|
this.failLevel('时间到了', '超过300秒,本关失败。不消耗次数,调整顺序再来一次。') |
|
|
} else { |
|
|
} else { |
|
|
this.startTimer(false) |
|
|
this.startTimer(false) |
|
|
} |
|
|
} |
|
|
@ -905,7 +905,7 @@ |
|
|
const elapsed = Math.floor((Date.now() - this.startTs) / 1000) |
|
|
const elapsed = Math.floor((Date.now() - this.startTs) / 1000) |
|
|
this.timeLeft = Math.max(0, this.timeLimit - elapsed) |
|
|
this.timeLeft = Math.max(0, this.timeLimit - elapsed) |
|
|
if (this.timeLeft <= 0) { |
|
|
if (this.timeLeft <= 0) { |
|
|
this.failLevel('时间到了', '超过180秒,本关失败。不消耗次数,调整顺序再来一次。') |
|
|
this.failLevel('时间到了', '超过300秒,本关失败。不消耗次数,调整顺序再来一次。') |
|
|
} |
|
|
} |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
}, |
|
|
}, |
|
|
|