LoggerEngine을 이어붙이기
This commit is contained in:
@@ -29,8 +29,12 @@ export class GameLoggerEngine {
|
||||
) {
|
||||
}
|
||||
|
||||
public static initInstance(rsc: IResourceController) {
|
||||
public static initInstance(rsc: IResourceController): GameLoggerEngine{
|
||||
if(GameLoggerEngine.instance){
|
||||
throw new Error("GameLogger is already initialized");
|
||||
}
|
||||
GameLoggerEngine.instance = new GameLoggerEngine(rsc);
|
||||
return GameLoggerEngine.instance;
|
||||
}
|
||||
|
||||
public static getInstance(): GameLoggerEngine {
|
||||
@@ -61,8 +65,12 @@ export class GameLoggerEngine {
|
||||
}
|
||||
|
||||
flushAll() {
|
||||
if(this.logStack.size === 0){
|
||||
return;
|
||||
}
|
||||
//rsc?
|
||||
throw new Error("Not yet implemented");
|
||||
this.logStack.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,5 +2,6 @@ export * from "./LogicFunc/generalStats.js";
|
||||
export * as defs from "./defs.js";
|
||||
export * from "./IResourceController.js";
|
||||
export * from "./ActionRequest/index.js";
|
||||
export * from "./GameLogger.js";
|
||||
// NOTE: game_logic은 client, server 모두에서 사용되는 라이브러리이다.
|
||||
// DB에 접근한다면 DI여야하나?
|
||||
Reference in New Issue
Block a user