private static List <SavedTimeEvent> ReadTimeEvents(BinaryReader reader) { var count = reader.ReadInt32(); var result = new List <SavedTimeEvent>(count); for (var i = 0; i < count; i++) { result.Add(SavedTimeEvent.Load(reader)); } return(result); }
public static MapTimeEventState Load(BinaryReader reader) { var count = reader.ReadInt32(); var events = new List <SavedTimeEvent>(count); for (var i = 0; i < count; i++) { events.Add(SavedTimeEvent.Load(reader)); } return(new MapTimeEventState { Events = events }); }