public static DayGroup Read(StreamReader data, StreamWriter outputData, bool write = true) { DayGroup obj = new DayGroup(); obj.ChanceOfOccur = Utils.readAndWriteSingle(data, outputData, write); obj.DayName = Utils.readAndWriteString(data, outputData, write); uint num_sky_objects = Utils.readAndWriteUInt32(data, outputData, write); obj.SkyObjects = new List <SkyObject>(); for (uint i = 0; i < num_sky_objects; i++) { obj.SkyObjects.Add(SkyObject.Read(data, outputData, write)); } uint num_sky_times = Utils.readAndWriteUInt32(data, outputData, write); obj.SkyTime = new List <SkyTimeOfDay>(); for (uint i = 0; i < num_sky_times; i++) { obj.SkyTime.Add(SkyTimeOfDay.Read(data, outputData, write)); } return(obj); }
public static SkyDesc Read(StreamReader data, StreamWriter outputData, bool write = true) { SkyDesc obj = new SkyDesc(); obj.TickSize = Utils.readAndWriteUInt64(data, outputData, write); obj.LightTickSize = Utils.readAndWriteUInt64(data, outputData, write); uint numDayGroups = Utils.readAndWriteUInt32(data, outputData, write); obj.DayGroups = new List <DayGroup>(); for (uint i = 0; i < numDayGroups; i++) { obj.DayGroups.Add(DayGroup.Read(data, outputData, write)); } return(obj); }
public override string ToString() { return(DayGroup.GetFriendlyName()); }