public void RunServer() { if (!started) { this.onTick += new TickHandler(Tick); ships = new ConcurrentDictionary <int, Ship>(); Console.WriteLine("Starting DB server..."); serverDB = serverManager.serverDB; Console.WriteLine("Starting inventory server..."); inventoryServer = serverManager.inventoryServer; Console.WriteLine("loading ships..."); LoadShips(); Console.WriteLine("Starting server..."); Run(); } }
public void Run() { itemDB = new ItemDB(this); inventoryServer = new InventoryServer(this); serverDB = new ServerDB(this); server = new Server(this); Thread myThread = new Thread(new ThreadStart(server.RunServer)); myThread.Start(); Console.ReadKey(); server.PlayerControlSetTarget(0, Command.SetTarget, 1); Console.ReadKey(); server.PlayerControlSetTarget(0, Command.WarpTo, 1); Console.ReadKey(); server.PlayerControlSetTarget(0, Command.MoveTo, 1); //server.RunServer(); }