public void LoadLevel(Room room, string file) { using (var stream = new FileDataStream(file)) { var header = stream.ReadInt(); if (header != 0x1157A401) // <- Supposed to represent LIGTHAN01 throw new FormatException("Corrupt file: Invalid header"); } }
public void LoadJsonLevel(Room room, string file) { dynamic jsobj; using (var sr = new StreamReader(file)) jsobj = JsonConvert.DeserializeObject(sr.ReadToEnd()); foreach (var obj in jsobj.Objects) { } }