/************************************** 文件名:time.js 功能:该模块用于处理游戏时间相关内容 版本:2.0(23.01.08) **************************************/ /************************************** 对象名:Time 参数:h: 小时, min: 分钟, s: 秒 **************************************/ function Time(h, min, s){ this.time = { h: h, min: min, s: s } } /************************************** 方式名:getTime() 功能:获得当前游戏时间 返回值:当前游戏时间字符串 **************************************/ Time.prototype.getTime = function(){ return `${this.time.h}h${this.time.min}min${this.time.s}s`; }