public GameServer(int region) { string gameServerIndex = "GameServer" + Guid.NewGuid(); myGameInfo = new GameServerInfo() { DataManager = new DataManager(), GameServerName = gameServerIndex, QueueManager = new QueueManager(gameServerIndex), }; serverManager = new ServerManager(region, myGameInfo); Global.Process.On("exit", () => { serverManager.End(); Console.Log("exiting game server " + gameServerIndex); }); serverManager.Init(); }
public ServerManager(int region, GameServerInfo gameServerInfo) { myRegion = region; myGameServerInfo = gameServerInfo; }