36 lines
704 B
JavaScript
36 lines
704 B
JavaScript
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;
|
|
},
|
|
});
|