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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user