43 lines
866 B
Go
43 lines
866 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
|
|
api *apiComp
|
|
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.modelArena = this.RegisterComp(new(modelArena)).(*modelArena)
|
|
}
|