mirror of
https://github.com/Gongxh0901/kunpolibrary
synced 2025-11-02 04:15:48 +00:00
first commit
This commit is contained in:
20
src/module/ModuleBase.ts
Normal file
20
src/module/ModuleBase.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
/**
|
||||
* @Author: Gongxh
|
||||
* @Date: 2024-12-07
|
||||
* @Description: 模块基类
|
||||
*/
|
||||
|
||||
import { Component } from "cc";
|
||||
import { IModule } from "../global/IModule";
|
||||
|
||||
export abstract class ModuleBase extends Component implements IModule {
|
||||
/** 模块名称 */
|
||||
public moduleName: string;
|
||||
|
||||
/** 模块初始化 (内部使用) */
|
||||
public init(): void { }
|
||||
|
||||
/** 模块初始化完成后调用的函数 */
|
||||
protected abstract onInit(): void;
|
||||
}
|
||||
Reference in New Issue
Block a user