From b6c265e44cbb7c1aa76f347df919738d1c0e9492 Mon Sep 17 00:00:00 2001 From: zhaocy Date: Fri, 24 Jun 2022 12:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/configure_comp.go | 21 +++++++-------------- sys/configure/options.go | 6 ++++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index d6eab6892..d07045589 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -24,20 +24,13 @@ type Configure_Comp struct { //组件初始化接口 func (this *Configure_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - this.ModuleCompBase.Init(service, module, comp, options) - this.LoadConfigure(game_hero, cfg.NewGame_newHero) - this.LoadConfigure(game_heroStargrow, cfg.NewGame_heroStargrow) - this.LoadConfigure(game_heroLevelgrow, cfg.NewGame_heroLevelgrow) - this.LoadConfigure(game_heroStarup, cfg.NewGame_heroStarup) - this.LoadConfigure(game_heroLevelup, cfg.NewGame_heroLevelup) - this.LoadConfigure(game_heroExp, cfg.NewGame_heroExp) - - // this.GetHeroConfigure() - // this.GetHeroStargrowCon() - // this.GetHeroLevelgrowCon() - // this.GetHeroStarupCon() - // this.GetHeroLevelUpCon() - // this.GetHeroExpCon() + err = this.ModuleCompBase.Init(service, module, comp, options) + err = this.LoadConfigure(game_hero, cfg.NewGame_newHero) + err = this.LoadConfigure(game_heroStargrow, cfg.NewGame_heroStargrow) + err = this.LoadConfigure(game_heroLevelgrow, cfg.NewGame_heroLevelgrow) + err = this.LoadConfigure(game_heroStarup, cfg.NewGame_heroStarup) + err = this.LoadConfigure(game_heroLevelup, cfg.NewGame_heroLevelup) + err = this.LoadConfigure(game_heroExp, cfg.NewGame_heroExp) return } diff --git a/sys/configure/options.go b/sys/configure/options.go index 6d6d129bb..b27b0bee4 100644 --- a/sys/configure/options.go +++ b/sys/configure/options.go @@ -44,3 +44,9 @@ func newOptionsByOption(opts ...Option) (Options, error) { } return options, nil } + +func SetConfigPath(v string) Option { + return func(o *Options) { + o.ConfigurePath = v + } +}