Exemplo n.º 1
0
 public void ExitGame()
 {
     currentMap = null;
     while (GetWindowManager().GetWindow() != null)
     {
         GetWindowManager().RemoveWindow();
     }
     masterGame.SetGameState(TowerDefenseGame.GameState.MainWindow);
 }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 //##################################
 //######## 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);
 }
Exemplo n.º 4
0
 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);
 }