fix: 修正拼写错误并添加升级动画播放逻辑

- 将 `palayBuff` 方法名更正为 `playBuff`
- 在英雄升级时调用 `playAllTime` 方法播放"plus"动画
- 确保动画播放方法在参数为空时安全返回
This commit is contained in:
walkpan
2026-04-04 09:23:49 +08:00
parent a14115fb6a
commit c40fbfe4e4
3 changed files with 9 additions and 3 deletions

View File

@@ -87,6 +87,8 @@ export class Hero extends ecs.Entity {
mLogger.log(this.debugMode,"hero",node.getSiblingIndex());
var hv = node.getComponent(HeroViewComp)!;
if(hero_lv >1){hv.playAllTime("plus")}
const model = this.get(HeroAttrsComp);
// 从配置中读取英雄静态数据
let hero = HeroInfo[uuid];