// Use this for initialization void Start() { U3DSocket socket = U3DSocket.shareSocket(); socket.ConnectTo(IP.ip, IP.port, (str) => { print("连接成功: str=" + str); isConnection = true; EventDispatch.addEventListener(this, "do"); }, (str) => { print("连接失败:" + str); }, 10); this.transform.Find("Panel/Image/Button").GetComponent <Button>().onClick.AddListener(() => { if (isConnection) { ByteBuffer buffer = ByteBuffer.CreateBufferAndType(1001); buffer.writeString("xjy"); buffer.writeString("123456"); buffer.Send(); } }); }
// Use this for initialization void Start() { EventDispatch.addEventListener(this, "do"); this.transform.Find("Panel/bgImage/contentPanel/line6/btn_createRoom").GetComponent <Button>().onClick.AddListener(() => { GetCreateRoomData(); }); this.transform.Find("Panel/bgImage/closeButt1").GetComponent <Button>().onClick.AddListener(() => { this.transform.gameObject.SetActive(false); }); }
// Use this for initialization void Start() { EventDispatch.addEventListener(this, "do"); this.transform.Find("Panel/left/joinRoomButt").GetComponent <Button>().onClick.AddListener(() => { //跳转到加入房间的页面。 this.transform.Find("AddRoom").gameObject.SetActive(true); }); this.transform.Find("Panel/left/createRoomButt").GetComponent <Button>().onClick.AddListener(() => { this.transform.Find("CreateRoom").gameObject.SetActive(true); }); }
// Use this for initialization void Start() { EventDispatch.addEventListener(this, "do"); Player play = Player.SharPlayer(); // Debug.Log(play.Image); this.transform.Find("Panel/img_Yezi_top/img_Yezi/text_Name").GetComponent <Text>().text = play.CName; this.transform.Find("Panel/img_Yezi_top/img_Yezi/img_Que/img_Gold/text_Gold").GetComponent <Text>().text = play.Money + ""; this.transform.Find("Panel/img_Yezi_top/img_Yezi/img_Que/but_UserKK/img_yellow/img_TouXiang").gameObject.GetComponent <DownImage>().loadImage(play.Image); createRoom(); addroom(); }
void Start() { LoadFactory.LoadAssetText(downPath, this, callBack, false); //this.transform.parent //this.transform U3DSocket socket = U3DSocket.shareSocket(); socket.ConnectTo(IP.ip, IP.port, (str) => { EventDispatch.addEventListener(this, "do"); print("连接成功"); isCon = true; }, (str) => { print("连接失败"); isCon = false; }); }
// Use this for initialization void Start() { EventDispatch.addEventListener(this, "do"); U3DSocket.shareSocket().StartRead(); sendToControll(); }
public GameHallOrderLogic(GameHallForm frame) { hallForm = frame; EventDispatch.addEventListener(this, "com"); }
void Start() { EventDispatch.addEventListener(this, "do"); this.name = "Socket"; DontDestroyOnLoad(this); }
public Form1() { InitializeComponent(); main = this; EventDispatch.addEventListener(this, "do ", this); }
public RoomControl(MyRoomView _myRoom) { myRoom = _myRoom; EventDispatch.addEventListener(this, "do"); roomInfo = new RoomInfo(); }
public Load() { InitializeComponent(); EventDispatch.addEventListener(this, "do"); }
public RegeditForm() { InitializeComponent(); EventDispatch.addEventListener(this, "com"); }
public RoomView() { EventDispatch.addEventListener(this, "do"); U3DSocket.shareSocket().StartRead(); }
Dictionary <int, deskNode> dic = new Dictionary <int, deskNode>();//用来保存座位号,和对应的桌子 private RoomControll() { RoomInfo = new roomInfo(); EventDispatch.addEventListener(this, "do"); Debug.Log("newlControll"); }
public RegWindow() { InitializeComponent(); EventDispatch.addEventListener(this); }