53 lines
1.2 KiB
Go
53 lines
1.2 KiB
Go
package guidance
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/base"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
)
|
|
|
|
/*
|
|
模块名:新手引导
|
|
描述:新手引导
|
|
开发:李伟
|
|
*/
|
|
func NewModule() core.IModule {
|
|
m := new(Guidance)
|
|
return m
|
|
}
|
|
|
|
type Guidance struct {
|
|
modules.ModuleBase
|
|
api_comp *apiComp
|
|
service base.IRPCXService
|
|
configure *configureComp
|
|
modelGuidance *ModelGuidance
|
|
}
|
|
|
|
// 模块名
|
|
func (this *Guidance) GetType() core.M_Modules {
|
|
return comm.ModuleGuidance
|
|
}
|
|
|
|
// 模块初始化接口 注册用户创建角色事件
|
|
func (this *Guidance) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
this.service = service.(base.IRPCXService)
|
|
return
|
|
}
|
|
|
|
// 模块初始化接口 注册用户创建角色事件
|
|
func (this *Guidance) Start() (err error) {
|
|
err = this.ModuleBase.Start()
|
|
return
|
|
}
|
|
|
|
// 装备组件
|
|
func (this *Guidance) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
this.modelGuidance = this.RegisterComp(new(ModelGuidance)).(*ModelGuidance)
|
|
}
|