12345678910111213141516171819202122232425262728293031323334353637383940 |
- import { _decorator, Component, Node, EditBox, director } from 'cc';
- import { Constant } from './constant';
- import ScenceMng from './gcommon/ScenceMng';
- import { UIButton } from './gcommon/UIButton';
- const { ccclass, property } = _decorator;
- @ccclass('debug_view')
- export class debug_view extends Component {
- @property(Node) ip:Node = null;
- @property(Node) port:Node = null;
- @property(Node) btn_finish:Node = null;
- start() {
-
- }
- onClick(){
- var ip = this.ip.getComponent(EditBox).string
- if(ip===""){
- ip = this.ip.getComponent(EditBox).placeholder
- }
- var port = this.port.getComponent(EditBox).string
- if(port===""){
- port = this.port.getComponent(EditBox).placeholder
- }
- Constant.SEVER_INFO.IP = ip
- Constant.SEVER_INFO.PORT = port
- console.log("Constant.SEVER_INFO",Constant.SEVER_INFO)
- director.loadScene('GameLaunch');
- this.btn_finish.active = false;
- }
- update(deltaTime: number) {
-
- }
- }
|