package battletest import ( "go_dreamfactory/comm" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" "go_dreamfactory/lego/core/cbase" ) /* 模块名:红点系统 描述:统一获取红点信息 开发:李伟 */ func NewModule() core.IModule { m := new(BattleTest) return m } type BattleTest struct { cbase.ModuleBase options *Options service base.IRPCXService clientmgr *battleClientMgrComp //c#战斗客户端端管理 pressuretest *pressuretestComp } // 模块名 func (this *BattleTest) GetType() core.M_Modules { return comm.ModuleBattleTest } // 重构模块配置对象 func (this *BattleTest) NewOptions() (options core.IModuleOptions) { return new(Options) } // 模块初始化接口 注册用户创建角色事件 func (this *BattleTest) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { if err = this.ModuleBase.Init(service, module, options); err != nil { return } this.options = options.(*Options) this.service = service.(base.IRPCXService) return } func (this *BattleTest) Start() (err error) { if err = this.ModuleBase.Start(); err != nil { return } return } // 装备组件 func (this *BattleTest) OnInstallComp() { this.ModuleBase.OnInstallComp() this.clientmgr = this.RegisterComp(new(battleClientMgrComp)).(*battleClientMgrComp) this.pressuretest = this.RegisterComp(new(pressuretestComp)).(*pressuretestComp) }