Пример #1
0
        // 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();
                }
            });
        }
Пример #2
0
 // 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);
     });
 }
Пример #3
0
        // 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);
            });
        }
Пример #4
0
        // 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();
        }
Пример #5
0
        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;
            });
        }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     EventDispatch.addEventListener(this, "do");
     U3DSocket.shareSocket().StartRead();
     sendToControll();
 }
Пример #7
0
 public GameHallOrderLogic(GameHallForm frame)
 {
     hallForm = frame;
     EventDispatch.addEventListener(this, "com");
 }
Пример #8
0
 void Start()
 {
     EventDispatch.addEventListener(this, "do");
     this.name = "Socket";
     DontDestroyOnLoad(this);
 }
Пример #9
0
 public Form1()
 {
     InitializeComponent();
     main = this;
     EventDispatch.addEventListener(this, "do ", this);
 }
Пример #10
0
 public RoomControl(MyRoomView _myRoom)
 {
     myRoom = _myRoom;
     EventDispatch.addEventListener(this, "do");
     roomInfo = new RoomInfo();
 }
Пример #11
0
 public Load()
 {
     InitializeComponent();
     EventDispatch.addEventListener(this, "do");
 }
Пример #12
0
 public RegeditForm()
 {
     InitializeComponent();
     EventDispatch.addEventListener(this, "com");
 }
Пример #13
0
 public RoomView()
 {
     EventDispatch.addEventListener(this, "do");
     U3DSocket.shareSocket().StartRead();
 }
Пример #14
0
        Dictionary <int, deskNode> dic = new Dictionary <int, deskNode>();//用来保存座位号,和对应的桌子


        private RoomControll()
        {
            RoomInfo = new roomInfo();
            EventDispatch.addEventListener(this, "do");
            Debug.Log("newlControll");
        }
Пример #15
0
 public RegWindow()
 {
     InitializeComponent();
     EventDispatch.addEventListener(this);
 }