예제 #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);
 }