コード例 #1
0
            /// <inheritdoc />
            public void Enter()
            {
                _net.Log.Debug("Starting network session as {0}", _mode);

                if (_mode.IsServerEnabled())
                {
                    StartServer();
                }

                if (_mode.IsClientEnabled())
                {
                    StartClient();
                }

                _net.Mode = _mode;
            }
コード例 #2
0
            /// <inheritdoc />
            public void Enter()
            {
                _net.Log.Debug("Starting network session as {0}", _mode);

                // It's important that this is set first. It allow the StartX methods to query exactly what state they're starting into
                _net.Mode = _mode;

                if (_mode.IsServerEnabled())
                {
                    StartServer();
                }

                if (_mode.IsClientEnabled())
                {
                    StartClient();
                }
            }
コード例 #3
0
 private void Net_ModeChanged(NetworkMode mode)
 {
     if (mode.IsClientEnabled())
     {
         RestartTransmissionPipeline();
     }
     else
     {
         StopTransmissionPipeline();
     }
 }
コード例 #4
0
 // ReSharper disable once InconsistentNaming
 private void Net_ModeChanged(NetworkMode mode)
 {
     _netModeRequiresPipeline = mode.IsClientEnabled();
 }