Пример #1
0
 public void Create(List <string> paramlist, ContentHolder TCH)
 {
     foreach (string paramline in paramlist)
     {
         AddWeapon(FileServices.LineCommaSplit(paramline), TCH);
     }
 }
Пример #2
0
        public void Create(ContentHolder TCH, GraphicsDeviceManager GDM, Camera ACamera)
        {
            List <String> AreaNames = FileServices.ReadFileLines(@"Files\AreaNames.txt");

            foreach (string AreaName in AreaNames)
            {
                AddLocation(AreaName, TCH, GDM, ACamera);
            }
        }
Пример #3
0
 void AddWeapon(string[] param, ContentHolder TCH)
 {
     if (param[0] == "0")
     {
         Weapon Temp = new Weapon();
         Temp.Create(param, TCH);
         WeaponList.Add(Temp);
     }
     else
     {
         AutoWeapon Temp = new AutoWeapon();
         Temp.Create(param, TCH);
         WeaponList.Add(Temp);
     }
 }
Пример #4
0
        void AddLocation(string AreaName, ContentHolder TCH, GraphicsDeviceManager GDM, Camera ACamera)
        {
            Location      Temp         = new Location();
            List <String> FileLines    = FileServices.ReadFileLines(@"Files\" + AreaName + ".txt");
            List <String> TilePlanRows = FileServices.ReadFileLines(@"Files\" + AreaName + "TilePlan.txt");

            foreach (String CurrentLine in FileLines)
            {
                String[] Line = FileServices.LineCommaSplit(CurrentLine);
                if (Line[0] == "0")
                {
                    Temp.Create(Line, TCH, TilePlanRows);
                }
                else if (Line[0] == "1")
                {
                    Temp.AddObject(Line, TCH);
                }
                else if (Line[0] == "3")
                {
                    Temp.AddEnemy(GDM, Line, ACamera, TCH);
                }
            }
            Locations.Add(Temp);
        }