feat(hero): 添加技能特效播放接口并优化英雄资源
- 在 HeroViewComp 中添加 palayBuff、palayReady、playEnd 方法用于播放技能特效 - 删除未使用的 buff 预制体(maxy、foot_jiasu)及其元数据 - 调整 heal 预制体的位置、尺寸和动画参数以优化显示效果 - 简化多个英雄预制体结构,移除嵌套的 up 节点以提升性能 - 更新 SkillSet 配置,为技能添加 readyAnm 和 endAnm 字段支持
This commit is contained in:
@@ -293,7 +293,30 @@ export class HeroViewComp extends CCComp {
|
||||
shield_tip(absorbed: number) {
|
||||
this.hp_tip(TooltipTypes.life, absorbed.toFixed(0));
|
||||
}
|
||||
|
||||
public palayBuff(anm: string = ""){
|
||||
if(anm==="") return;
|
||||
var path = "game/skill/buff/" + anm;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = this.node;
|
||||
}
|
||||
|
||||
public palayReady(anm: string = ""){
|
||||
if(anm==="") return;
|
||||
var path = "game/skill/ready/" + anm;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = this.node;
|
||||
}
|
||||
|
||||
public playEnd(anm: string = ""){
|
||||
if(anm==="") return;
|
||||
var path = "game/skill/end/" + anm;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = this.node;
|
||||
}
|
||||
|
||||
/** 治疗特效 */
|
||||
private heathed() {
|
||||
var path = "game/skill/buff/heathed";
|
||||
|
||||
Reference in New Issue
Block a user