DelayNoMore/frontend/assets/scripts/ConfirmLogout.js
2022-09-20 23:52:55 +08:00

30 lines
545 B
JavaScript

cc.Class({
extends: cc.Component,
properties: {
mapNode: {
type: cc.Node,
default: null,
}
},
onButtonClick(event, customData) {
const mapScriptIns = this.mapNode.getComponent('Map');
switch (customData) {
case 'confirm':
mapScriptIns.logout.bind(mapScriptIns)(true, false);
break;
case 'cancel':
mapScriptIns.onLogoutConfirmationDismissed.bind(mapScriptIns)();
break;
default:
break;
}
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
}
});