perf: 更新通关弹窗

This commit is contained in:
richarjiang
2025-10-10 11:12:02 +08:00
parent d6d612949e
commit dbdec71d0d
24 changed files with 1426 additions and 59 deletions

View File

@@ -424,6 +424,8 @@ export class PlayerController extends Component {
onBeginContact(selfCollider: Collider2D, otherCollider: Collider2D) {
console.log('碰撞检测', selfCollider.node.name, otherCollider.node.name);
// 禁用碰撞器,防止重复触发
otherCollider.enabled = false;
if (otherCollider.node.name.startsWith('guai_')) {
this.handleAttack(otherCollider);
} else if (otherCollider.node.name.startsWith('box_')) {
@@ -920,7 +922,7 @@ export class PlayerController extends Component {
this.hideActivePopup();
};
this.scheduleOnce(this.pendingPopupHide, 3);
// this.scheduleOnce(this.pendingPopupHide, 3);
}
/**