refactor(英雄): 移除复活时间相关逻辑

- 从 HeroAttrs 枚举中删除 revive_time 属性
- 移除 HeroAtkSystem 中的 scheduleRevive 调用
- 清理 HeroAttrsComp 中与复活时间相关的字段和重置逻辑
- 简化 HeroViewComp 的 alive 方法并删除 scheduleRevive 方法
This commit is contained in:
panw
2026-04-23 09:40:36 +08:00
parent 8ab0cc3971
commit 0676412a5a
4 changed files with 6 additions and 22 deletions

View File

@@ -27,7 +27,6 @@ export enum Attrs {
// ==================== 特殊效果属性 ====================
freeze_chance = "freeze_chance", // 冰冻概率
revive_count = "revive_count", // 复活次数
revive_time = "revive_time", // 复活时间
invincible_time = "invincible_time",// 无敌时间
puncture = "puncture", // 穿刺次数
wfuny = "wfuny", // 风怒

View File

@@ -194,8 +194,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
// 触发死亡动画(假死)
if (targetView) {
targetView.do_dead();
// 延迟1秒复活
targetView.scheduleRevive(1.0);
}
mLogger.log(this.debugMode, 'HeroAtkSystem', ` Hero waiting to revive! Lives left: ${TAttrsComp.revive_count}`);
return reDate;

View File

@@ -42,8 +42,6 @@ export class HeroAttrsComp extends ecs.Comp {
wfuny: number = 0; // 风怒
revive_count: number = 0; // 总复活次数
is_revived:number = 0; // 已复活次数
revive_time: number = 0; // 复活时间
invincible_time: number = 0;// 无敌时间
@@ -249,7 +247,6 @@ export class HeroAttrsComp extends ecs.Comp {
this.critical = 0;
this.freeze_chance = 0;
this.revive_count = 0;
this.revive_time = 0;
this.invincible_time = 0;
this.puncture = 0;
this.wfuny = 0;

View File

@@ -389,28 +389,17 @@ export class HeroViewComp extends CCComp {
alive(){
// 重置复活标记 - 必须最先重置否则status_change会被拦截
this.model.is_reviving = false;
this.model.is_dead=false
this.model.is_count_dead=false
this.deadCD = 0;
this.as.do_buff();
this.status_change("idle");
this.top_node.active=true
this.setTopBarOpacity(false);
this.lastBarUpdateTime=0
// this.status_change("idle");
// this.top_node.active=true
// this.setTopBarOpacity(false);
// this.lastBarUpdateTime=0
}
/**
* 调度复活逻辑
* @param delay 延迟时间(秒)
*/
scheduleRevive(s_uuid:number) {
const sConf=SkillSet[s_uuid]
this.playReady(sConf.readyAnm)
this.skill_name('',s_uuid)
this.alive();
}
/**
* 死亡视图表现