Ejemplo n.º 1
0
        /// <summary>
        /// Performs write to server stream
        /// </summary>
        /// <param name="data">data to write to server</param>
        public static void WriteToServer(byte[] data)
        {
            if (IsConnected)// && mySocket != null)
            {
                mySocket.Send(data);
            }
            else
            {
                // observable
                FoolObservable.OnSendError();
                UnityEngine.Debug.LogWarning("Can't send data to server: Not connected.");

                FoolNetwork.Reconnect();
            }
        }
Ejemplo n.º 2
0
 public void OnClick()
 {
     FoolNetwork.JoinRandom();
 }