feat(技能): 新增触发技能机制并调整死亡特效颜色

- 在 GameEvent 枚举中添加 TriggerSkill 事件用于技能触发
- 为 Hero 和 Monster 实体添加召唤入场时的 call 技能触发
- 在 HeroAtkSystem 中实现死亡时的 dead 技能触发
- 扩展 SCastSystem 支持强制触发技能(忽略CD和动画前摇)
- 将死亡技能特效颜色从灰色调整为白色以提升视觉效果
This commit is contained in:
walkpan
2026-04-05 22:09:16 +08:00
parent 5a5d849c0b
commit ef07982645
6 changed files with 104 additions and 4 deletions

View File

@@ -143,6 +143,15 @@ export class Hero extends ecs.Entity {
move.moving = false;
hv.as.idle();
// 触发 call 技能
if (hero.call) {
oops.message.dispatchEvent(GameEvent.TriggerSkill, {
s_uuid: hero.call,
heroAttrs: model,
heroView: hv
});
}
// 依据下落距离自适应入场时长,保证手感稳定
const dropDistance = Math.abs(pos.y - dropToY);
const dropDuration = Math.max(0.18, Math.min(0.38, dropDistance / 1200));