public void Init(HoloeverEmulatorManager remote) { TCP_HEAD_BYTES = IntToBytes(TCP_HEAD_TAG); phoneRemote = remote; clientInfoData = new ClientInfoData(); clientInfoData.type = (int)RD_MESSAGE.RD_MESSAGE_CLIENT_INFO; clientInfoData.clientVersion = CLIENT_VERSION; clientInfoData.enableControllerDebug = NxrViewer.Instance.RemoteController ? (byte)1 : (byte)0; // Debug.Log("---" + ClientInfoData.Size); phoneEventThread = new Thread(phoneEventSocketLoop); phoneEventThread.Start(); }
void DealWithUserName(FBResult result) { if (result.Error != null) { Debug.Log("problem with getting profile picture"); ds.debugTxt += "problem with getting profile picture\n"; FB.API("/me?fields=id,first_name", Facebook.HttpMethod.GET, DealWithUserName); return; } profile = Util.DeserializeJSONProfile(result.Text); Debug.Log(result.Text); ds.debugTxt += result.Text; Text UserMsg = UIFBUserName.GetComponent <Text>(); string first_name = profile["first_name"]; string last_name = profile["last_name"]; string full_name = first_name + "_" + last_name; UserMsg.text = full_name; // save client name ClientInfoData.SetClinetName(FB.UserId, first_name, last_name); }
private void SendClientInfoData(ClientInfoData data) { byte[] ba_ClientInfoData = StructToBytes(clientInfoData, ClientInfoData.Size); SendDataToServer(ba_ClientInfoData); }
public void UpdateClientScoreData(int score) { ClientInfoData.SetScore(score); }