fix(hero): 修复英雄大招动画播放异常问题

1. 重构大招播放方法,支持传入自定义动画clip名,适配不同职业的大招动画
2. 修复技能匹配逻辑,通过前缀匹配处理max0/max1类型的大招技能
3. 更新技能配置表,将辅助职业的技能act改为max1适配新逻辑
This commit is contained in:
panFD
2026-09-14 21:38:52 +08:00
parent 7640957325
commit 8c8810bb7e
4 changed files with 26 additions and 15 deletions

View File

@@ -487,11 +487,14 @@ export class HeroViewComp extends CCComp {
playSkillAnm(act: string = "") {
mLogger.log(this.debugMode, 'HeroViewComp', '[heroview] act' + act,)
if (act === "") return;
// 技能表大招 act 配置为 clip 名("max0"/"max1"),必须前缀匹配,
// 全等匹配 "max" 会落空导致大招动画不播、isCastingMax 不置位
if (act.startsWith("max")) {
this.isCastingMax = true;
this.as.max(act)
return
}
switch (act) {
case "max":
this.isCastingMax = true;
this.as.max()
break
case "atk":
this.as.atk()
break