static public void SetDataPath(string dataPath) { var file = new FileInfo(Path.Combine(dataPath, "Animals-AE.xml")); var converter = new XmlSerializer(typeof(AnimalTemplates)); using (var stream = file.OpenRead()) s_Templates = ((AnimalTemplates)converter.Deserialize(stream)); }
public static void SetDataPath(string dataPath) { var file = new FileInfo(Path.Combine(dataPath, "Animals-AE.xml")); var converter = new XmlSerializer(typeof(AnimalTemplates)); using (var stream = file.OpenRead()) s_Templates = ((AnimalTemplates)converter.Deserialize(stream)); }