public void Load(Guid domainId, Guid nodeId, Guid mapId) { var mapLoader = MapLoaderFactory.CreateMapLoader(domainId, mapId, nodeId); mapLoader.MapLoadStarted += MapLoaderOnMapLoadStarted; mapLoader.MapLoadFailed += MapLoaderOnMapLoadFailed; mapLoader.Load(); }
internal static void Load(int index) { if (GameListLoader.Games.Count >= index) { _game = GameListLoader.Games[index]; string map = _game.map.ToString(); _map = MapLoaderFactory.CreateLoader(map); _map.LoadContent(Global.Content); var result = ApiReq.CreateReq() .WithMethod("api/map/" + map, "get") .GetResult(out string json); if (result == HttpStatusCode.OK) { _map.SetMapData(DynamicJson.Parse(json)); Global.RunState = RunState.Run; } } }