go_dreamfactory/modules/arena/module.go
2022-10-25 14:35:24 +08:00

46 lines
992 B
Go

package arena
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
/*
模块名:战斗模块
描述:处理游侠战斗相关业务
开发:李伟
*/
func NewModule() core.IModule {
m := new(Arena)
return m
}
type Arena struct {
modules.ModuleBase
battle comm.IBattle
api *apiComp
configure *configureComp
modelArena *modelArena
}
//模块名
func (this *Arena) GetType() core.M_Modules {
return comm.ModuleArena
}
//模块初始化接口 注册用户创建角色事件
func (this *Arena) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
//装备组件
func (this *Arena) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
this.modelArena = this.RegisterComp(new(modelArena)).(*modelArena)
}