public void ExitGame() { currentMap = null; while (GetWindowManager().GetWindow() != null) { GetWindowManager().RemoveWindow(); } masterGame.SetGameState(TowerDefenseGame.GameState.MainWindow); }
/// <summary> /// /// </summary> /// <param name="masterMap"></param> /// <param name="tileX"></param> /// <param name="tileY"></param> /// <param name="isBuildable"></param> /// <param name="texture"></param> public GameTile(GameMap masterMap, int tileX, int tileY, bool isBuildable, Texture2D texture) { this.map = masterMap; this.tileX = tileX; this.tileY = tileY; this.buildable = isBuildable; this.baseImage = texture; this.drawRectangle = new Rectangle(tileX * TILE_DIMENSIONS, tileY * TILE_DIMENSIONS, TILE_DIMENSIONS, TILE_DIMENSIONS); }
//################################## //######## Constructors ############ //################################## /// <summary> /// /// </summary> /// <param name="masterMap"></param> /// <param name="tileX"></param> /// <param name="tileY"></param> /// <param name="isBuildable"></param> public GameTile(GameMap masterMap, int tileX, int tileY, bool isBuildable) { this.map = masterMap; this.tileX = tileX; this.tileY = tileY; this.buildable = isBuildable; this.baseImage = map.DEFAULT_TILE_TEXTURE; this.drawRectangle = new Rectangle(tileX * TILE_DIMENSIONS, tileY * TILE_DIMENSIONS, TILE_DIMENSIONS, TILE_DIMENSIONS); }
public void LoadMap(string mapName) { currentMap = new GameMap(masterGame, mapName); if (currentMap.IsPaused()) { currentMap.TogglePause(); } gameGUI = new GameGUIManager(this, masterGame, content, currentMap.GetMapHeight() * GameTile.TILE_DIMENSIONS, currentMap.GetMapWidth() * GameTile.TILE_DIMENSIONS); waveManager = new WaveManager(this, masterGame, content); }