feat(boss): tint boss outline green in phase 2 and red in phase 3

Add FlashSprite.setPhaseOutline (P1 default / P2 green / P3 red) and drive it from BossPhaseSystem.onPhaseEnter; reset outline on pooled boss reuse so stale tint never leaks to the next owner. Red outline material asset must be created in editor (copy green, tint red) and bound to FlashSprite.outlineMatRed.
This commit is contained in:
panFD
2026-10-10 00:25:23 +08:00
parent 11ba692f18
commit b31d870d90
4 changed files with 59 additions and 2 deletions

View File

@@ -576,6 +576,17 @@ export class HeroViewComp extends CCComp {
// }
}
/** 复位阶段描边为默认(Boss 池化复用必经路径,防红/绿描边残留到下一个复用者) */
public resetPhaseOutline() {
let flash = this.node.getComponent(FlashSprite);
if (!flash) {
flash = this.node.getComponentInChildren(FlashSprite);
}
if (flash) {
flash.setPhaseOutline(0);
}
}
}