统一属性计算函数

This commit is contained in:
panfudan
2025-07-30 00:19:46 +08:00
parent 11a957b08a
commit 6c6fb64ab1
2 changed files with 49 additions and 31 deletions

View File

@@ -97,10 +97,11 @@ export class HeroConComp extends CCComp {
switch(data.buffType){
case BuffAttr.ATK:
this.heroView.TALENT[BuffAttr.ATK]+=data.value
this.heroView.count_ap()
this.heroView.count_atrr(BuffAttr.ATK)
break
case BuffAttr.ATK_CD:
this.heroView.TALENT[BuffAttr.ATK_CD]+=data.value
this.heroView.count_atrr(BuffAttr.ATK_CD)
break
case BuffAttr.HP:
this.heroView.TALENT[BuffAttr.HP]+=data.value