Beispiel #1
0
 public static void LoadAll()
 {
     Levels.LoadAll();
     MenuTextures.LoadAll();
     Prefabs.LoadAll();
     Sprites.LoadAll();
 }
Beispiel #2
0
 /// <summary>
 /// Call to set menus rectangles and load textures
 /// </summary>
 public static void Load()
 {
     try
     {
         QuoteString = ApiQuotes.contents.quotes[0].quote;
     }
     catch
     {
         QuoteString = "ERROR-Requested api to many times under one hour";
     }
     MenuBoxes.Add("mapSlot1", new Rectangle(64, 52, 285, 235));
     MenuBoxes.Add("mapSlot2", new Rectangle(440, 48, 285, 235));
     MenuBoxes.Add("mapSlot3", new Rectangle(64, 334, 285, 235));
     MenuBoxes.Add("mapSlot4", new Rectangle(440, 330, 285, 235));
     MenuBoxes.Add("start", new Rectangle(225, 125, 325, 60));
     MenuBoxes.Add("option", new Rectangle(225, 240, 325, 60));
     MenuBoxes.Add("exit", new Rectangle(225, 350, 325, 60));
     MenuBoxes.Add("arrowLeft", new Rectangle(190, 580, 50, 50));
     MenuBoxes.Add("arrowRight", new Rectangle(570, 580, 50, 50));
     MenuBoxes.Add("exitOptions", new Rectangle(200, 400, 80, 40));
     MenuBoxes.Add("startWaveKey", new Rectangle(200, 100, 120, 20));
     MenuBoxes.Add("activateSpellKey", new Rectangle(200, 70, 120, 20));
     for (int i = 0; i < 8; i++)
     {
         MenuBoxes.Add($"selectTowerKey{i}", new Rectangle(200, 130 + (30 * i), 120, 20));
     }
     for (int i = 0; i < 3; i++)
     {
         for (int j = 0; j < 4; j++)
         {
             MenuBoxes.Add($"tower{(i * 4) + j}", new Rectangle(35 + (j * 190), 127 + (i * 100), 160, 75));
         }
     }
     MenuTextures.Add(Location.MainMenu, LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/MainMenu.png"));
     MenuTextures.Add(Location.MapSelector, LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/MapSelection.png"));
     MenuTextures.Add(Location.Options, LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/OptionsBackground.png"));
     MenuTextures.Add(Location.TowerSelector, LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/TowerSelection.png"));
     ExitOptionsButtonTex = LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/OptionsExitButton.png");
     ArrowLTex            = LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/arrowLeft.png");
     ArrowRTex            = LoadData.LoadTexture2D(Game1.graphics.GraphicsDevice, "MenuGraphics/arrowRight.png");
 }