技能继续调整
This commit is contained in:
@@ -10,7 +10,6 @@ import { GameEvent } from "../common/config/GameEvent";
|
||||
import { TooltipTypes } from "../common/config/Mission";
|
||||
import { Attrs, } from "../common/config/HeroAttrs";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { EBusComp } from "./EBusComp";
|
||||
import { Tooltip } from "../skill/Tooltip";
|
||||
import { timedCom } from "../skill/timedCom";
|
||||
|
||||
@@ -93,7 +92,7 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
// 添加安全检查,防止在实体销毁过程中访问null的model
|
||||
if (!this.model) return;
|
||||
|
||||
if(this.model.is_dead) return;
|
||||
// ✅ View 层职责:处理表现相关的逻辑
|
||||
this.processDamageQueue(); // 伤害数字显示队列
|
||||
|
||||
@@ -158,17 +157,7 @@ export class HeroViewComp extends CCComp {
|
||||
node.setPosition(pos);
|
||||
}
|
||||
|
||||
/** 死亡特效 */
|
||||
private dead() {
|
||||
var path = "game/skill/buff/dead";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = this.node.parent;
|
||||
node.setScale(node.scale.x * 0.5, node.scale.y * 0.5);
|
||||
let pos = v3(this.node.position.x, this.node.position.y + 30, this.node.position.z);
|
||||
node.setPosition(pos);
|
||||
}
|
||||
|
||||
|
||||
/** 受击特效 */
|
||||
private in_atked(anm: string = "atked", scale: number = 1) {
|
||||
var path = "game/skill/end/" + anm;
|
||||
@@ -270,7 +259,7 @@ export class HeroViewComp extends CCComp {
|
||||
this.model.is_count_dead = true; // 防止重复触发,必须存在防止重复调用
|
||||
|
||||
// 播放死亡特效
|
||||
this.dead();
|
||||
this.as.dead();
|
||||
|
||||
// 根据阵营触发不同事件
|
||||
if(this.model.fac === FacSet.MON){
|
||||
@@ -325,14 +314,7 @@ export class HeroViewComp extends CCComp {
|
||||
// 预留:反击、护盾触发等
|
||||
}
|
||||
|
||||
to_grave(){
|
||||
tween(this.node).to(0.5, { position:v3(-900,this.node.position.y+300,0)},{
|
||||
onComplete: (target?: object) => {
|
||||
this.node.setPosition(-900,this.node.position.y-300,0)
|
||||
}
|
||||
}).start()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 调试日志(已禁用) */
|
||||
to_console(value:any, value2:any=null, value3:any=null){
|
||||
|
||||
Reference in New Issue
Block a user