Exemplo n.º 1
0
        public void Initialize(GameServerSettings settings)
        {
            Settings = settings;

            var configuration = new DefaultServerConfiguration
            {
                Port = settings.Port,
                MaximumConnections = settings.MaximumConnections
            };

            server = new LidgrenServer();
            server.Initialize(configuration);

            entityHelper.Clear();
            tempEntityEvents.Clear();
        }
Exemplo n.º 2
0
        private void CreateHost()
        {
            var settings = new GameServerSettings
            {
                MaximumConnections = 4,
                Port = globalSettings.Network.ServerPort,
            };

            settings.World.Gravity = globalSettings.World.Gravity;
            settings.World.Seed = globalSettings.World.Seed;

            gameServer.Initialize(settings);
            gameServer.Start();

            JoinHost(globalSettings.Network.ServerAddress);
        }