Exemple #1
0
        public virtual async Task StartAsync(CancellationToken cancellationToken)
        {
            await Configure();

            Login = new LoginServer(this);
            Login.Start();

            ServerConfig.Instance.Worlds.ForEach(x =>
            {
                var world = new World(x);
                Worlds.Add(world);

                for (byte i = 0; i < x.Channels; i++)
                {
                    var game = new GameServer(this, world, ServerConfig.Instance.ChannelPort++, i);
                    world.Add(game);
                    game.Start();
                }
            });

            Shop = new ShopServer(this);
            Shop.Start();
        }
 static void Main(string[] args)
 {
     shop = new ShopServer();
     shop.start();
 }