Exemplo n.º 1
0
 public void AddFloor(Floors floor, string curse)
 {
     this.RunFloors.Add(floor);
     floor.Curse = curse;
 }
Exemplo n.º 2
0
        public static void ParseJsonFloorList()
        {
            string json = File.ReadAllText(Environment.CurrentDirectory + "\\resources\\JSON\\JsonFloorList.json");

            dynamic deserializedItems = JsonConvert.DeserializeObject(json);

            foreach (var jsonFloor in deserializedItems)
            {
                var floor = new Floors();

                floor.Id = jsonFloor.Name;
                floor.Name = jsonFloor.First["name"];
                floor.ShortName = jsonFloor.First["shortName"]; 

                if (floor.Name.Contains("Burning"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\13.png");
                }
                else if (floor.Name.Contains("Flooded"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\14.png");
                }
                else if (floor.Name.Contains("Dank"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\15.png");
                }
                else if (floor.Name.Contains("Scarred"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\16.png");
                }
                else if (floor.Name.Contains("Basement"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\1.png");
                }
                else if (floor.Name.Contains("Cellar"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\2.png");
                }
                else if (floor.Name.Contains("Caves"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\3.png");
                }
                else if (floor.Name.Contains("Catacombs"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\4.png");
                }
                else if (floor.Name.Contains("Depths"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\5.png");
                }
                else if (floor.Name.Contains("Necropolis"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\6.png");
                }
                else if (floor.Name.Contains("Womb"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\7.png");
                }
                else if (floor.Name.Contains("Utero"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\8.png");
                }
                else if (floor.Name.Contains("Sheol"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\9.png");
                }
                else if (floor.Name.Contains("Cathedral"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\10.png");
                }
                else if (floor.Name.Contains("Chest"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\11.png");
                }
                else if (floor.Name.Contains("Room"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\12.png");
                }
                else if (floor.Name.Contains("???"))
                {
                    floor.Icon = new Bitmap(Environment.CurrentDirectory + @"\resources\images\floors\18.png");
                }

                Floors.List.Add(floor);
            }
        }
Exemplo n.º 3
0
 public void AddFloor(Floors floor)
 {
     this.RunFloors.Add(floor);
 }
Exemplo n.º 4
0
 public static Floors ConvertFloorToXL(Floors floor)
 {
     if (floor.Name.Contains("Burning Basement"))
     {
         return Floors.List.Find(asd => asd.Name == "Burning Basement XL");
     }
     else if (floor.Name.Contains("Flooded Caves"))
     {
         return Floors.List.Find(asd => asd.Name == "Flooded Caves XL");
     }
     else if (floor.Name.Contains("Dank Depths"))
     {
         return Floors.List.Find(asd => asd.Name == "Dank Depths XL");
     }
     else if (floor.Name.Contains("Scarred Womb"))
     {
         return Floors.List.Find(asd => asd.Name == "Scarred Womb XL");
     }
     else if (floor.Name.Contains("Basement"))
     {
         return Floors.List.Find(asd => asd.Name == "Basement XL");
     }
     else if (floor.Name.Contains("Cellar"))
     {
         return Floors.List.Find(asd => asd.Name == "Cellar XL");
     }
     else if (floor.Name.Contains("Caves"))
     {
         return Floors.List.Find(asd => asd.Name == "Caves XL");
     }
     else if (floor.Name.Contains("Catacombs"))
     {
         return Floors.List.Find(asd => asd.Name == "Catacombs XL");
     }
     else if (floor.Name.Contains("Depths"))
     {
         return Floors.List.Find(asd => asd.Name == "Depths XL");
     }
     else if (floor.Name.Contains("Necropolis"))
     {
         return Floors.List.Find(asd => asd.Name == "Necropolis XL");
     }
     else if (floor.Name.Contains("Womb"))
     {
         return Floors.List.Find(asd => asd.Name == "Womb XL");
     }
     else if (floor.Name.Contains("Utero"))
     {
         return Floors.List.Find(asd => asd.Name == "Utero XL");
     }
     else
     {
         return null;
     }
 }