/// <summary> /// Creates the buy menu /// </summary> private static void CreateBuyWindow() { BuyMenu = new Window(740, 100, false, TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/BuyMenu")); BuyMenu.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/Bot_FastTower"), "fast", UnlockTowerButton); BuyMenu.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/Bot_StrongTower"), "strong", UnlockTowerButton); BuyMenu.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/Bot_SprayTower"), "spray", UnlockTowerButton); }
/// <summary> /// Constructor of the TDStartState /// </summary> public TDStartState() { tdMouse = new TDPointer(new Vector2(200, 200)); TDLayers = new TPLayer[numLayers]; for (int i = 0; i < numLayers; i++) { TDLayers[i] = new TPLayer(layers); } background = new TPSprite(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/StartScreenBackground")); TDLayers[0].AddEntity(background); TDLayers[numLayers-1].AddEntity(tdMouse); TowerDefenseManager.setLayers(TDLayers); menuwindow = new Window(menuxpos, menuypos, true, TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/startscreenWindow")); menuwindow.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/StartButton"), "start", startGame); menuwindow.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/ExitButton"), "exit", quitGame); }
/// <summary> /// Everything included with building the bottom menu bar should go here. /// </summary> private static void CreateBottomBar() { BottomBar = new Window(0, 620, true, TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/BotBar")); BottomBar.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/BuyButton"), "BuyButton", MakeBuyWindowVisible); BottomBar.addButton(TPEngine.Get().TextureManager.LoadTexture(@"art/TowerDefense/Bot_NormalTower"), "normal", TowerBuilder.TowerBuildingClicked); NormalTower.UnlockTowerClass(); }