예제 #1
0
      public void LoadData()
      {
          //Load data here
            
          Houses = CreateHouses();

          Characters = CreateCharacters();

          Places = CreatePlaces();

          IsDataLoaded = true;
      }
예제 #2
0
      private PlaceGroup CreatePlaces()
      {
          PlaceGroup PGroup = new PlaceGroup();
          String[] filenames = System.IO.Directory.GetFiles("Assets\\PlaceImages");

          foreach (var file in filenames)
          {
               string midfilename = file.Substring(19);
              int i = midfilename .IndexOf(".");
              string filename = midfilename.Substring(0, i);
             
              PGroup.PlaceItems.Add(new PlaceData() { PlaceName = filename , PlaceImage = file });
          }
          return PGroup;
      }