36 lines
704 B
JavaScript
Raw Permalink Normal View History

2025-04-24 17:03:28 +08:00
import GameModel from "../ts/core/GameModel";
import MsgAlert from "../ts/game/msg/MsgAlert";
import FGHUD from "../ts/gear_2.3.4/fgui/FGHUD";
let CPubFunction = require('../game/PubFunction');
cc.Class({
extends: cc.Component,
properties: {
nameEdit: cc.EditBox,
aimEdit: cc.EditBox
},
onLoad() {
},
createBtnClicked(e, d) {
if (this.nameEdit.string == '') {
MsgAlert.addMsg(`請輸入幫會名稱!`);
return;
}
FGHUD.showLoading();
GameModel.send('c2s_createbang', {
name: this.nameEdit.string,
aim: this.aimEdit.string,
masterid: GameModel.player.roleid,
mastername: GameModel.player.name
});
},
onCloseBtnClicked(e, d) {
this.node.active = false;
},
});