/// <summary> /// Boots up the server /// </summary> public static void Start() { Config.Load(); Listener = new TcpIPListener(Config.Port); Listener.OnSocketConnect += ProcessConnection; Listener.Start(); GenerateSalt(); Scheduler = new Scheduler("Main.Scheduler"); Scheduler.Start(); Players = new List <Player>(); Levels = new List <Level>(); Group.Initialise(); Command.Initialise(); Seed.Initialise(); EntityHandler.Initialise(); PlayerDB = new SqlDatabase("PlayerDB"); MainLevel = NbtLoader.Load(Config.MainLevel) ?? new Level("main", 64, 64, 64); Levels.Add(MainLevel); Heartbeat.Beat(); }
public void Initialise() { var mapFilename = @"C:\Source\MapEditor\MapEngine\Content\Maps\TestMap3.json"; _cameraHandler.Initialise(mapFilename); _mapHandler.Initialise(mapFilename); var weaponsPath = @"C:\Source\MapEditor\MapEngine\Content\Weapons\"; var unitsPath = @"C:\Source\MapEditor\MapEngine\Content\Units\"; var modelsPath = @"C:\Source\MapEditor\MapEngine\Content\Models"; _unitHandler.Initialise(unitsPath, mapFilename, weaponsPath, modelsPath); }