private static void LoadGridNode(IMapManager mapMan, IMap map, ref GridId?newId, YamlMappingNode gridNode) { var info = (YamlMappingNode)gridNode["settings"]; var chunk = (YamlSequenceNode)gridNode["chunks"]; YamlGridSerializer.DeserializeGrid(mapMan, map, ref newId, info, chunk); }
void ReadGridSection() { var grids = RootNode.GetNode <YamlSequenceNode>("grids"); var mapMan = IoCManager.Resolve <IMapManager>(); foreach (var grid in grids) { var newId = new GridId?(); YamlGridSerializer.DeserializeGrid( mapMan, TargetMap, ref newId, (YamlMappingNode)grid["settings"], (YamlSequenceNode)grid["chunks"] ); Grids.Add(mapMan.GetGrid(newId.Value)); } }
void ReadGridSection() { var grids = RootNode.GetNode <YamlSequenceNode>("grids"); foreach (var grid in grids) { var newId = new GridId?(); YamlGridSerializer.DeserializeGrid( _mapManager, TargetMap, ref newId, (YamlMappingNode)grid["settings"], (YamlSequenceNode)grid["chunks"], _tileMap, _tileDefinitionManager ); Grids.Add(_mapManager.GetGrid(newId.Value)); } }