public TextureMap(TextureMap map) { TileTexture = map.TileTexture; TextureWidth = map.TextureHeight; TileWidth = map.TileWidth; TileHeight = map.TileHeight; }
private void SwitchTextures() { Map2.TextureMap previousTexture = new Map2.TextureMap(CurrentMap.TextureMap); string input = Microsoft.VisualBasic.Interaction.InputBox("Enter Texture.", "Change TileMap"); if (input != null && input != "") { // CurrentMap.TextureMap.TileTexture = input; CurrentMap.TextureMap.SetTileTexture(input, 0, 0); try { OpenTextures(); } catch (Exception ex) { Forms.MessageBox.Show("Could not open texture: " + ex.Message); CurrentMap.TextureMap = previousTexture; OpenTextures(); } } }
public Map(ContentManager content, string tileSet, int tileWidth, int tileHeight, int width, int height, int spriteWidthHeight) : this(content, width, height, spriteWidthHeight) { TextureMap = new TextureMap(tileSet, tileWidth, tileHeight, spriteWidthHeight, spriteWidthHeight); }
public Rectangle GetTileOnSheet(int id) { return(TextureMap.GetTileOnSheet(id)); }