Beispiel #1
0
        public ClassSelectButton(Rectangle loc, Texture2D t, string n, Color s, SpriteFont sf)
            : base(loc, t, n, s, sf)
        {
            listOfUnits = new FileInput("Content/Units.txt", "Textures.txt");
            listOfUnits.LoadUnit();


            classOptions = new List <MenuButton>();

            for (int i = 0; i < listOfUnits.UnitList.Count(); i++)
            {
                // This now loads from the notepad document instead
                String temp = "";
                temp = listOfUnits.UnitList[i].Name;
                #region

                /* switch (i)
                 * {
                 *   case 0:
                 *       temp = listOfUnits.UnitList[i].Name;
                 *       break;
                 *   case 1:
                 *       temp = "Shotgun";
                 *       break;
                 *   case 2:
                 *       temp = "Alien";
                 *       break;
                 *   case 3:
                 *       temp = "Engineer";
                 *       break;
                 *   case 4:
                 *       temp = "Minigun";
                 *       break;
                 *   case 5:
                 *       temp = "Assasin";
                 *       break;
                 *   case 6:
                 *       temp = "Sniper";
                 *       break;
                 *   case 7:
                 *       temp = "Medic";
                 *       break;
                 *   case 8:
                 *       temp = "Buff";
                 *       break;
                 * }*/
                #endregion
                classOptions.Add(new MenuButton(loc, t, temp, s, sf, false));
                classOptions[i].Y -= 50 * (i + 1);
            }
            clicked = false;
        }
Beispiel #2
0
 /// <summary>
 /// This loads the content from the FileInput object
 /// </summary>
 public void LoadContent()
 {
     // Load in from the notepad document of units
     allUnits.LoadUnit();
     allUnits.LoadTextures();
 }