Ejemplo n.º 1
0
          public Creatures[] GetAll()
          {
              var values = (CompiledTypes.Creatures.RowValues[])Enum.GetValues(typeof(CompiledTypes.Creatures.RowValues));

              Creatures[] returnList = new Creatures[values.Length];
              for (int i = 0; i < values.Length; i++)
              {
                  returnList[i] = Get(values[i]);
              }
              return(returnList);
          }
Ejemplo n.º 2
0
 public CastleDB(TextAsset castleDBAsset, TextAsset castleDBImagesAsset = null)
 {
     parsedDB = new CastleDBParser(castleDBAsset, castleDBImagesAsset);
     CastleDBParser.RootNode root = parsedDB.Root;
     Creatures = new Dictionary <string, Creatures>();
     foreach (var row in root.GetSheetWithName("Creatures").Rows)
     {
         Creatures[row["id"]] = new Creatures(root, row, parsedDB.DatabaseImages);
     }
     Items = new Dictionary <string, Items>();
     foreach (var row in root.GetSheetWithName("Items").Rows)
     {
         Items[row["id"]] = new Items(root, row, parsedDB.DatabaseImages);
     }
     Modifiers = new Dictionary <string, Modifiers>();
     foreach (var row in root.GetSheetWithName("Modifiers").Rows)
     {
         Modifiers[row["id"]] = new Modifiers(root, row);
     }
 }