37 lines
525 B
JavaScript
37 lines
525 B
JavaScript
import GameModel from "../ts/core/GameModel";
|
|
import MsgAlert from "../ts/game/msg/MsgAlert";
|
|
/*
|
|
* 消耗世界鈴鐺,編輯信息界面
|
|
*/
|
|
cc.Class({
|
|
extends: cc.Component,
|
|
|
|
properties: {
|
|
edit: cc.EditBox,
|
|
},
|
|
|
|
onLoad () {
|
|
|
|
},
|
|
|
|
start () {
|
|
|
|
},
|
|
|
|
onConfirmClick () {
|
|
let str = this.edit.string;
|
|
if (str.length == 0) {
|
|
MsgAlert.addMsg('請輸入廣播內容!');
|
|
return;
|
|
}
|
|
GameModel.send('c2s_bell_msg', {
|
|
msg: str,
|
|
});
|
|
this.node.destroy();
|
|
},
|
|
|
|
onCancelClick () {
|
|
this.node.destroy();
|
|
},
|
|
});
|