ARCed.Controls.MapEditorXnaPanel.LoadNewMap C# (CSharp) Метод

LoadNewMap() приватный Метод

private LoadNewMap ( RPG map ) : void
map RPG
Результат void
        private void LoadNewMap(RPG.Map map)
        {
            _map = map;
            if (map == null)
            {
                Invalidate();
                return;
            }
            _tileset = Project.Data.Tilesets[_map.tileset_id];
            Size = new Size(MapPixelWidth, MapPixelHeight);
            _srcTexture = Cache.Tileset(_tileset.tileset_name).ToTexture(GraphicsDevice);
            _autotiles[0] = null;
            for (int i = 1; i <= _tileset.autotile_names.Count; i++)
            {
                string name = _tileset.autotile_names[i - 1];
                if (!_autotileCache.ContainsKey(name))
                    _autotileCache[name] = CreateAutotile(name);
                _autotiles[i] = _autotileCache[name];
            }
            Invalidate();
        }