同步主站 Cocos 当前工程:关卡资源、运行脚本与打包工具。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-12 14:40:34 +08:00
parent ae75fce80b
commit fac515a669
5609 changed files with 27744634 additions and 5653 deletions

View File

@@ -58,6 +58,12 @@ export class PropController extends Component {
this.onCollected(player);
}
/** 同关重开:金币只隐藏不销毁,立刻放回格子,避免异步补刷拖过编辑器 200ms */
restoreForRestart() {
this.collected = false;
if (this.node?.isValid) this.node.active = true;
}
private onCollected(player: PlayerController) {
if (this.collected) return;
this.collected = true;
@@ -66,8 +72,6 @@ export class PropController extends Component {
player.addCoins();
const propCell = this.getLogicCell();
gm.removePropAtCell(propCell);
this.node.removeFromParent();
this.node.destroy();
if (gm.allPropsCollected()) {
player.externalCallResult(true);
}