Пример #1
0
        private static void Setup()
        {
            var myLogger = new Logger();

            myLogger.Setup();

            Logger.Log(LogType.Debug, "Loading configuration...");
            Configuration.Load(); // -- Load server settings.
            Logger.Log(LogType.Debug, "Done");

            var wd = new Watchdog();

            TaskScheduler.RegisterTask("Watchdog", wd);
            TaskScheduler.RegisterTask("Heartbeat", new Heartbeat());
            TaskScheduler.RegisterTask("Blocks", new BlockManager());
            TaskScheduler.RegisterTask("PluginManager", new PluginManager());
            CommandHandler.RegisterInternalCommands();
            TaskScheduler.RegisterTask("Commands", new CommandHandler());

            TaskScheduler.RunSetupTasks();
            _server = new Server();

            LoadMaps();

            FillManager.LoadFills();
        }
Пример #2
0
 private static void MainLoop()
 {
     while (Running)
     {
         TaskScheduler.RunMainTasks();
         Thread.Sleep(1);
     }
 }
Пример #3
0
 public static void Stop()
 {
     Running = false;
     TaskScheduler.RunTeardownTasks();
 }