Exemplo n.º 1
0
        public void Disconnect()
        {
            if (!Connected)
            {
                throw new Exception("No connection to sever!");
            }
            DebugHelperUnity.Log($"Disconnected from {ConnectedBundle}");

            ConnectedBundle.DisjoinPort(this);
            ConnectedBundle = null;
        }
Exemplo n.º 2
0
        public void Connect(WireBundle bundle)
        {
            if (Connected)
            {
                throw new Exception($"Disconnect the existing bundle '{ConnectedBundle}' first!");
            }

            ConnectedBundle = bundle;
            bundle.JoinPort(this);

            DebugHelperUnity.Log($"Connected to {bundle}");
        }