feat(boss): tint boss sprite outline by phase (P2 green, P3 red)

Add FlashSprite.setOutlineByBossPhase with light/dark green shade option and red fallback; BossPhaseSystem drives HeroViewComp.applyBossPhaseOutline directly after phase switch (MON faction, no hero-level event semantics, pool-node safe); extract getFlashSprite/applyOutlineByLevel to dedupe the three outline call sites.
This commit is contained in:
panFD
2026-10-10 00:33:41 +08:00
parent 24aff3baa3
commit a122d0904c
3 changed files with 76 additions and 17 deletions

View File

@@ -19,6 +19,7 @@ import { SkillSet } from "../common/config/SkillSet";
import { mLogger } from "../common/Logger";
import { HeroAttrsComp } from "./HeroAttrsComp";
import { BossPhaseComp } from "./BossPhaseComp";
import { HeroViewComp } from "./HeroViewComp";
/** 阶段模块调试日志开关 */
const DEBUG = true;
@@ -119,6 +120,13 @@ export class BossPhaseSystem extends ecs.ComblockSystem implements ecs.ISystemUp
fromPhase: from,
toPhase: phase.index,
});
// 直接驱动描边:Boss 是 MON 阵营,不走英雄 HeroLvUp 语义;
// 且对象池节点上挂全局事件监听易漏注销,直接调视图组件最稳
const view = e.get(HeroViewComp);
if (view && view.node && view.node.isValid) {
view.applyBossPhaseOutline(phase.index);
}
}
/** TODO: 阶段退场表现(震屏/变暗等),后续迭代实现 */