public Level(Game1 game, string levelName, int gameHeight, int gameWidth) : base(game) { _game = game; _gameHeight = gameHeight; _gameWidth = gameWidth; spriteBatch = new SpriteBatch(game.GraphicsDevice); TowerMenu = new TowerButtonMenu(Game1.Game, Vector3.Zero); tiles = new Tile[_gameWidth, _gameHeight]; for (int x = 0; x < _gameWidth; x++) { for (int y = 0; y < _gameHeight; y++) { var tile = new Tile(_game, new Vector3(x * Tile.TILE_SIZE, 0, y * Tile.TILE_SIZE), TileType.Grass); tiles[x, y] = tile; this._components.Add(tile); } } new LevelLoader(this, levelName); }
public TowerButton(Game1 game, Vector3 position, string text, TowerButtonMenu menu) : base(game, position, text) { _menu = menu; ChangeSize(new Vector2(40, 30)); }