refactor(fight/effect): 统一效果初始化接口,重构效果类型管理并优化参数传递逻辑
This commit is contained in:
@@ -56,7 +56,7 @@ func (this *EffectNode) IsCrit(opp *input.Input, skill *info.SkillEntity) {
|
||||
}
|
||||
|
||||
func (e *EffectNode) OnHit() bool {
|
||||
return true
|
||||
panic("not implemented") // TODO: Implement
|
||||
}
|
||||
|
||||
func (e *EffectNode) OnMiss() bool {
|
||||
|
||||
@@ -69,13 +69,9 @@ func (this *EffectNode) Duration(t ...int) int {
|
||||
}
|
||||
|
||||
// 设置参数,加上设置输入源
|
||||
func (this *EffectNode) SetArgs(args ...int) {
|
||||
|
||||
this.SideEffectArgs = args
|
||||
|
||||
}
|
||||
func (this *EffectNode) SetInput(args *input.Input) {
|
||||
this.Input = args
|
||||
func (this *EffectNode) SetArgs(t *input.Input, a ...int) {
|
||||
this.Input = t
|
||||
this.SideEffectArgs = a
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user