Ejemplo n.º 1
0
 public void ConnectAs(string name)
 {
     if (connection != null)
     {
         Destroy(connection);
     }
     ServerAddress = serverAddress + "?vsn=" + version + "&duelist=" + name;
     connection    = gameObject.AddComponent <PhoenixWebSocketConnection>();
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void Disconnect()
 {
     Destroy(connection);
     connection = null;
 }