Start() public method

public Start ( ) : void
return void
Esempio n. 1
0
        public async Task Start([Summary("ChannelPrefix")] string gameInput = null)
        {
            await ReplyAsync("Starting...");

            var channel     = (Context.User as IGuildUser)?.VoiceChannel;
            var audioClient = await channel.ConnectAsync();

            await _soundPlayer.PlayStartSound(audioClient);

            var gameStarter = new GameStarter(_settings, Context);
            var gameName    = gameInput ?? _settings.DefaultGame;
            await gameStarter.Start(_currentGames.Games[gameName]);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            //Initializes the server on port 35565. MaxPlayers=4
            NetworkManager.Init(35565, 4);


            //Initialize Content
            CommandTable.Init();
            PacketTable.Init();
            PacketManager.Lock(); //Locks the PacketManager.

            //Start Game Logic
            GameStarter.Start(Game.Start, Game.Stop, Game.Update);

            //Start listening for clients
            NetworkManager.StartListener();

            _isRunning = true;
            StartCommandLoop();
        }