feat: 添加冰冻效果并移除调试组件

- 在 GameSet 中添加冰冻时间常量 FROST_TIME
- 在 HeroAttrsComp 中新增 toFrost 方法用于处理冰冻状态
- 在 HeroAtkSystem 中增加冰冻判定,命中时触发冰冻效果并显示冰冻特效
- 简化 HeroViewComp 中的冰冻特效方法,移除眩晕特效方法
- 删除调试用的 HSkillComp 组件及其 meta 文件
- 调整 HeroBuffSystem 的计时器间隔,使冰冻状态更平滑地递减
This commit is contained in:
walkpan
2026-03-19 19:08:50 +08:00
parent 08fbb72d19
commit a08cca9cc3
7 changed files with 19 additions and 224 deletions

View File

@@ -4,6 +4,7 @@ import { BuffConf } from "../common/config/SkillSet";
import { HeroDisVal, HType } from "../common/config/heroSet";
import { mLogger } from "../common/Logger";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { FightSet } from "../common/config/GameSet";
@ecs.register('HeroAttrs')
export class HeroAttrsComp extends ecs.Comp {
public debugMode: boolean = false;
@@ -133,14 +134,11 @@ export class HeroAttrsComp extends ecs.Comp {
mLogger.log(this.debugMode, 'HeroAttrs', `添加属性: ${buffConf.name}, 属性:${buffConf.buff}, 值:${buffConf.value}`);
}
}
/**
* 把配置值统一转换为“可直接写入容器和结算”的数值
* - RATIO 会在写入前转换为 VALUE
* - BOOLEAN 保持原类型
*/
toFrost(time: number=1) {
this.frost_end_time += FightSet.FROST_TIME*time;
}
/**
* 通用属性修改应用
* @param attr 属性名
@@ -291,7 +289,7 @@ export class HeroAttrsComp extends ecs.Comp {
@ecs.register('HeroBuffSystem')
export class HeroBuffSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate {
private timer =new Timer(0.2)
private timer =new Timer(0.1)
filter(): ecs.IMatcher {
return ecs.allOf(HeroAttrsComp);
}
@@ -300,7 +298,7 @@ export class HeroBuffSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
if(this.timer.update(this.dt)){
const attrsComp = e.get(HeroAttrsComp);
if(attrsComp.frost_end_time > 0){
attrsComp.frost_end_time -= 0.2;
attrsComp.frost_end_time -= 0.1;
if(attrsComp.frost_end_time <= 0){
attrsComp.frost_end_time = 0;
}