private Dictionary <Vector2, int> DeserializeSavedTerrain() { var terrainLocation = Path.Combine(TileDecayJsonFilePath); var jsonTerrainFeatures = new JsonTerrainFeatures().HoeDirtTile; jsonTerrainFeatures = JsonConvert.DeserializeObject <Dictionary <Vector2, int> >(Encoding.UTF8.GetString(File.ReadAllBytes(terrainLocation))); if (jsonTerrainFeatures == null) { var newJTFeat = new JsonTerrainFeatures(); return(newJTFeat.HoeDirtTile); } return(jsonTerrainFeatures); }
public NoSoilDecay() { JsonTerrainFeatures = new JsonTerrainFeatures(); IsFirstRun = false; HasDeserializedToday = false; }