MatchMaster/assets/Transfer/script/Transfer.ts
2026-08-20 12:36:50 +08:00

31 lines
572 B
TypeScript

const { ccclass, property, requireComponent } = cc._decorator;
@ccclass
export default class Transfer extends cc.Component {
private closeCallback: () => void = null;
onLoad() {
this.init();
}
init(closeCallback?: () => void) {
if (closeCallback) {
this.closeCallback = closeCallback;
}
}
close() {
if (this.closeCallback) {
this.closeCallback();
return;
}
this.node.destroy();
}
clickTransfer() {
cc.fx.GameTool.onClickOtherGame();
}
}