public TextureMap(TextureMap map) { TileTexture = map.TileTexture; TextureWidth = map.TextureHeight; TileWidth = map.TileWidth; TileHeight = map.TileHeight; }
// public Trigger[] Triggers { get; set; } // private Vector2 _mapPosition; public Tentative.Map Clone() { Tentative.Map output = new Tentative.Map(); TextureMap thisMap = TextureMap; output.TextureMap = new TentativeTitle.Maps.TextureMap(thisMap.TileTexture, thisMap.TextureWidth, thisMap.TextureHeight, thisMap.TileWidth, thisMap.TileHeight); output.ChangeDimensions(Width, Height); for (int x = 0; x < Width; x++) { for (int y = 0; y < Height; y++) { Tentative.Tile outTile = new Tentative.Tile(); outTile.ID = Tiles[x, y].ID; outTile.Collidable = Tiles[x, y].Collidable; output.Tiles[x, y] = outTile; } } return(output); }
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)); }