go_dreamfactory/modules/hero/api.go
2022-07-19 19:38:32 +08:00

42 lines
1.2 KiB
Go

package hero
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type apiComp struct {
modules.MCompGate
service core.IService
module *Hero
}
const ( //消息回复的头名称
StrengthenUplv = "strengthenuplv"
HeroSubTypeInfo = "info" //英雄卡片信息
HeroSubTypeList = "list" //英雄列表
HeroSubTypeChouka = "chouka" //抽卡
ResonanceUseEnergy = "resonanceuseenergy" // 使用共鸣能量
Resonance = "resonance" // 英雄共鸣属性
ResonanceReset = "resonancereset" // 共鸣重置
StrengthenUpSkill = "strengthenupskill" // 技能强化
StrengthenUpStar = "strengthenupstar" // 英雄升星
Awaken = "awaken" // 英雄觉醒
HeroLock = "lock" // 英雄锁定
DrawCard = "drawcard" // 抽卡
)
//组件初始化接口
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*Hero)
this.service = service
return
}
func (this *apiComp) Start() (err error) {
err = this.MCompGate.Start()
return
}