package game import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" ) /* 模块名:游戏模块 描述:游戏战斗逻辑模块 开发:李伟 */ func NewModule() core.IModule { m := new(Game) return m } type Game struct { modules.ModuleBase api *apiComp configure *configureComp } //模块名 func (this *Game) GetType() core.M_Modules { return comm.ModuleEquipment } //模块初始化接口 注册用户创建角色事件 func (this *Game) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) return } //装备组件 func (this *Game) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) }