ConfigManager改全局单例
This commit is contained in:
@@ -194,6 +194,7 @@ export class GlobalConfig {
|
||||
this.MaxTokens = _buf_.readInt()
|
||||
this.Timeout = _buf_.readInt()
|
||||
this.FreeChatTimes = _buf_.readInt()
|
||||
this.GameName = _buf_.readString()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,6 +218,10 @@ export class GlobalConfig {
|
||||
* 单个角色免费聊天次数
|
||||
*/
|
||||
readonly FreeChatTimes: number
|
||||
/**
|
||||
* 游戏名
|
||||
*/
|
||||
readonly GameName: string
|
||||
|
||||
resolve(tables:Tables) {
|
||||
|
||||
@@ -225,6 +230,7 @@ export class GlobalConfig {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,6 +636,10 @@ export class TbGlobalConfig {
|
||||
* 单个角色免费聊天次数
|
||||
*/
|
||||
get FreeChatTimes(): number { return this._data.FreeChatTimes; }
|
||||
/**
|
||||
* 游戏名
|
||||
*/
|
||||
get GameName(): string { return this._data.GameName; }
|
||||
|
||||
resolve(tables:Tables) {
|
||||
this._data.resolve(tables)
|
||||
|
||||
Reference in New Issue
Block a user