Ejemplo n.º 1
0
        public void AddTileset(Tileset tileset)
        {
            if (Tilesets.ContainsKey(tileset.ID))
                throw new Exception("Este indice ja existe no dicionario");

            Tilesets.Add(tileset.ID, tileset);
        }
Ejemplo n.º 2
0
 public void AddTileset(Tileset tileset)
 {
     tilesets.Add(tileset);
     var grid = new Grid(editorView.GraphicsDevice, tileset.TileableTexture.Rows,
         tileset.TileableTexture.Cols);
     Grids.Add(tileset, grid);
     cbTileset.Items.Add(tileset);
 }
Ejemplo n.º 3
0
 private void btnSearchPath_Click(object sender, EventArgs e)
 {
     if (ofd.ShowDialog() == DialogResult.OK)
     {
         txtTilesetPath.Text = ofd.FileName;
         using (var stream = new FileStream(ofd.FileName, FileMode.Open))
         {
             Tileset = new Tileset(currentID, Texture2D.FromStream(editorView.GraphicsDevice, stream));
             Tileset.Name = txtName.Text;
         }
     }
 }