public void LoadData() { //Load data here Houses = CreateHouses(); Characters = CreateCharacters(); Places = CreatePlaces(); IsDataLoaded = true; }
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; }