refactor(hero): 移除 Boss 阶段描边相关未实现的代码

清理了 Boss 阶段描边功能的相关代码,包括移除了 resetPhaseOutline 和 setPhaseOutline 方法,删除了相关材质定义,将 onPhaseEnter 方法置空待后续迭代实现。
This commit is contained in:
panFD
2026-10-10 00:27:29 +08:00
parent b31d870d90
commit 24aff3baa3
5 changed files with 3 additions and 60 deletions

View File

@@ -19,9 +19,6 @@ export class FlashSprite extends Component {
@property({ type: Material, tooltip: '黄色描边材质(5级)' })
outlineMatYellow: Material | null = null;
@property({ type: Material, tooltip: '红色描边材质(Boss阶段3)' })
outlineMatRed: Material | null = null;
orginalFlashMaterial: Material | null = null;
defaultMaterial: Material | null = null; // 缓存最原始的无描边材质
sprite: Sprite | null = null;
@@ -67,31 +64,6 @@ export class FlashSprite extends Component {
}
}
/**
* 设置 Boss 阶段描边(与等级描边互斥,阶段优先)
* @param phase 阶段索引 0=P1(无描边/恢复默认) 1=P2(绿) 2=P3(红)
*/
public setPhaseOutline(phase: number) {
if (!this.sprite) {
this.sprite = this.node.getComponent(Sprite);
}
let targetMat: Material | null = null;
if (phase === 1) {
targetMat = this.outlineMatGreen;
} else if (phase >= 2) {
targetMat = this.outlineMatRed;
} else {
// P1 / 复位:恢复最原始的无描边材质
targetMat = this.defaultMaterial;
}
if (targetMat && this.sprite) {
this.orginalFlashMaterial = targetMat;
this.sprite.setSharedMaterial(targetMat, 0);
}
}
public clickFlash() {
if (!this.sprite || !this.hitFlashMaterial) return;