public TileManager(int tileSize) { fileHandler = new FileHandler(); tileSheet = new TileSheet("aztek", Vector2.Zero, tileSize); tileLists.Add(tiles1); tileLists.Add(tiles2); tileLists.Add(tiles3); tileLists.Add(collisionTiles); }
public TileArsenal(Vector2 _position, TileSheet _tileSheet, int _tileSize) : base(_position) { tileSheet = _tileSheet; tileSize = _tileSize; for (int i = 0; i < tileSheet.tileSheetSize.Y; i++) { for (int j = 0; j < tileSheet.tileSheetSize.X; j++) { tileArsenal.Add(new Tile("", new Point(j, i), new Vector2(j * tileSize, i * tileSize))); } } for (int i = 0; i < tileSheet.tileSheetSize.Y + 2; i++) { borders.Add(new GraphicalObject("Grass", Vector2.Zero)); borders.Add(new GraphicalObject("Grass", Vector2.Zero)); } for (int j = 0; j < tileSheet.tileSheetSize.X; j++) { borders.Add(new GraphicalObject("Grass", Vector2.Zero)); borders.Add(new GraphicalObject("Grass", Vector2.Zero)); } }
public void SetTileSheet(TileSheet _tileSheet) { tileSheet = _tileSheet; }
public void DrawSmall(SpriteBatch spriteBatch, TileSheet tileSheet) { spriteBatch.Draw(tileSheet.spriteSheet, Pos, SourceRectangle(), Color.White, 0f, origin, 0.6f, SpriteEffects.None, 0f); }