%深渊增加耗时显示 close #85

This commit is contained in:
UCPr 2025-04-26 00:57:15 +08:00
parent 5a0ecd278a
commit a134543639
5 changed files with 23 additions and 11 deletions

View file

@ -176,6 +176,8 @@ export class ChallengeNode {
/** @type {MonsterInfo} */
this.monster_info =
data?.monster_info && new MonsterInfo(data.monster_info);
/** @type {number} */
this.battle_time = data.battle_time;
}
async get_assets() {
@ -192,6 +194,12 @@ export class ChallengeNode {
return element.IDToElement(type);
});
}
get formattedTime() {
const seconds = this.battle_time % 60;
const minutes = Math.floor(this.battle_time / 60);
return `${minutes ? minutes + '分' : ''}${seconds + '秒'}`;
}
}
/**