fix: 修正拼写错误并添加升级动画播放逻辑
- 将 `palayBuff` 方法名更正为 `playBuff` - 在英雄升级时调用 `playAllTime` 方法播放"plus"动画 - 确保动画播放方法在参数为空时安全返回
This commit is contained in:
@@ -289,7 +289,7 @@ export class HeroViewComp extends CCComp {
|
||||
shield_tip(absorbed: number) {
|
||||
this.hp_tip(TooltipTypes.life, NumberFormatter.formatNumber(Math.max(0, Math.floor(absorbed))));
|
||||
}
|
||||
public palayBuff(anm: string = ""){
|
||||
public playBuff(anm: string = ""){
|
||||
if(anm==="") return;
|
||||
var path = "game/skill/buff/" + anm;
|
||||
this.spawnTimedFx(path, this.node, this.effectLifeTime);
|
||||
@@ -306,7 +306,11 @@ export class HeroViewComp extends CCComp {
|
||||
var path = "game/skill/end/" + anm;
|
||||
this.spawnAnimEndFx(path, this.node, undefined);
|
||||
}
|
||||
|
||||
public playAllTime(anm: string = ""){
|
||||
if(anm==="") return;
|
||||
var path = "game/skill/buff/" + anm;
|
||||
this.spawnAnimEndFx(path, this.node, undefined);
|
||||
}
|
||||
/** 治疗特效 */
|
||||
private heathed() {
|
||||
this.spawnAnimEndFx("game/skill/buff/heathed", this.node, undefined);
|
||||
|
||||
Reference in New Issue
Block a user