配置错误处理
This commit is contained in:
parent
4c11b17184
commit
b6c265e44c
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user