refactor(cardSkill): 完成卡牌技能触发机制类型化改造
本次提交为全量的卡牌技能触发系统重构,主要变更包括: 1. 新增CardTriggerType枚举,统一卡牌触发类型定义 2. 补全依赖事件派发:每波战斗结束FightEnd、英雄死亡HeroDead(带阵营过滤)、复活成功ReviveSuccess 3. 重构SkillBoxComp,按触发类型动态注册事件监听,拆分即时/定时/驻场/事件型逻辑 4. 批量迁移所有卡牌配置,为旧技能补充显式触发类型 5. 新增全局触发次数上限机制,区分每波/全局触发计数规则 6. 新增配套设计文档,记录改造背景与方案细节 本次重构彻底解决了原有隐式配置难以维护、无法支持事件型触发的痛点,实现了技能触发逻辑的标准化与可扩展性。
This commit is contained in:
@@ -55,12 +55,12 @@ export class MissionHeroComp extends CCComp {
|
||||
|
||||
/** 硬编码的6个英雄占位点 */
|
||||
public static readonly HERO_POSITIONS: Vec3[] = [
|
||||
v3(-210, BoxSet.GAME_LINE + 90, 0), // index 0 (node_index 1): Top Front
|
||||
v3(-160, BoxSet.GAME_LINE, 0), // index 1 (node_index 2): Mid Front
|
||||
v3(-210, BoxSet.GAME_LINE - 90, 0), // index 2 (node_index 3): Bot Front
|
||||
v3(-300, BoxSet.GAME_LINE + 90, 0), // index 3 (node_index 4): Top Back
|
||||
v3(-300, BoxSet.GAME_LINE, 0), // index 4 (node_index 5): Mid Back
|
||||
v3(-300, BoxSet.GAME_LINE - 90, 0), // index 5 (node_index 6): Bot Back
|
||||
v3(-175, BoxSet.GAME_LINE + 100, 0), // index 0 (node_index 1): Top Front
|
||||
v3(-170, BoxSet.GAME_LINE, 0), // index 1 (node_index 2): Mid Front
|
||||
v3(-175, BoxSet.GAME_LINE - 100, 0), // index 2 (node_index 3): Bot Front
|
||||
v3(-280, BoxSet.GAME_LINE + 100, 0), // index 3 (node_index 4): Top Back
|
||||
v3(-280, BoxSet.GAME_LINE, 0), // index 4 (node_index 5): Mid Back
|
||||
v3(-280, BoxSet.GAME_LINE - 100, 0), // index 5 (node_index 6): Bot Back
|
||||
];
|
||||
|
||||
/** 英雄出生时的掉落高度(从空中落到地面的像素差) */
|
||||
|
||||
Reference in New Issue
Block a user