Beispiel #1
0
 public void ConnectAs(string name)
 {
     if (connection != null)
     {
         Destroy(connection);
     }
     ServerAddress = serverAddress + "?vsn=" + version + "&duelist=" + name;
     connection    = gameObject.AddComponent <PhoenixWebSocketConnection>();
 }
        public static void Render(GameObject gameObject, RenderCommand renderCommand)
        {
            Package package = (renderCommand as RenderCommand.SendPhoenixPackage).dataPackage;
            PhoenixWebSocketConnection connection = gameObject.GetComponent <PhoenixWebSocketConnection>();

            if (connection == null)
            {
                Debug.Log("Tring to send a package on a gameObject without PhoenixWebSocketConnection component");
                return;
            }
            connection.Send(package);
        }
Beispiel #3
0
 public void Disconnect()
 {
     Destroy(connection);
     connection = null;
 }