go_dreamfactory/modules/gm/module.go

41 lines
766 B
Go

package gm
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
/*
模块名:GM工具模块
描述:处理客户端发过来的gm命令
开发:梅雄风
*/
func NewModule() core.IModule {
m := new(GM)
return m
}
type GM struct {
modules.ModuleBase
api_comp *apiComp
}
//模块名
func (this *GM) GetType() core.M_Modules {
return comm.ModuleGM
}
//模块初始化接口 注册用户创建角色事件
func (this *GM) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
//装备组件
func (this *GM) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
}