Esempio n. 1
0
 public Server(int port, string mapName = "test")
 {
     PORT      = port;
     _instance = this;
     Events?.Clear();
     Events         = new ServerEvents();
     CommandHandler = new CommandHandler();
     AssetLoader.LoadServerAssets();
     Map = AssetLoader.LoadMapFromFile(mapName);
     Map.LoadAllSpawners();
 }
Esempio n. 2
0
 public Server(ServerStartConfig config)
 {
     PORT      = config.Port;
     _instance = this;
     Events?.Clear();
     Events         = new ServerEvents();
     CommandHandler = new CommandHandler();
     TcpHandler     = new ServerTcpHandler();
     AssetLoader.LoadServerAssets();
     Map = AssetLoader.LoadMapFromFile(config.MapName);
     if (!config.DisableSpawners)
     {
         Map.LoadAllSpawners();
     }
 }