init
This commit is contained in:
19
src/managers/BaseManager.ts
Normal file
19
src/managers/BaseManager.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Monobehiver } from '../base/Monobehiver';
|
||||
import { Dictionary } from '../utils/Dictionary';
|
||||
|
||||
/**
|
||||
* 管理器基类 - 提供通用的初始化和缓存能力
|
||||
*/
|
||||
export class BaseManager<TMainApp = any> extends Monobehiver<TMainApp> {
|
||||
protected meshCache = new Dictionary<unknown>();
|
||||
protected isInitialized = false;
|
||||
|
||||
async initialize(): Promise<void> {
|
||||
if (this.isInitialized) return;
|
||||
this.isInitialized = true;
|
||||
}
|
||||
|
||||
clean(): void {
|
||||
this.meshCache.Clear();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user