示例#1
0
        /** Send join message */
        public override void Join(string packageName)           //data는쓰레기 호출할때도 "none"
        {
            Debug.Log("Join");
            UXPlayerController playerController = UXPlayerController.Instance;

            int    userCode = playerController.GetCode();
            string name     = playerController.GetName();

            string msg = "{\"cmd\":\"join\",\"type\":\"user\",\"l_code\":\"" + room.RoomNumber + "\",\"u_code\":\"" + userCode + "\",\"name\":\"" + name + "\",\"max_user\":\"0\", \"package_name\" : \"" + packageName + "\"}" + DATA_DELIMITER;

            Debug.Log(msg);
            Send(msg);            //{"cmd":"join","type":"user","l_code":"launcherCode","u_code":"userCode","name":"name","max_user":"******"}232
        }
        /** Send join message
         *      @param roomNumber room number
         */
        public override void Join(string data)
        {
            Debug.Log("Join");
            UXPlayerController player = UXPlayerController.Instance;

            if (player.IsUserLogin() == false)
            {
                OnJoinFailed(JOIN_ERROR_NOT_LOGIN);
                return;
            }

            string sendString = "{\"cmd\":\"join_user\",\"u_code\":\"" + player.GetCode() + "\",\"u_name\":\"" + player.GetName() + "\",\"l_code\":\"" + launcherCode + "\"}" + DATA_DELIMITER;

            Debug.Log("sen " + sendString);
            Send(sendString);
        }