コード例 #1
0
        public void Disconnect()
        {
            if (!Connected)
            {
                throw new Exception("No connection to sever!");
            }
            DebugHelperUnity.Log($"Disconnected from {ConnectedBundle}");

            ConnectedBundle.DisjoinPort(this);
            ConnectedBundle = null;
        }
コード例 #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}");
        }