Exemple #1
0
        public static SkyDesc Read(DatReader datReader)
        {
            SkyDesc obj = new SkyDesc();

            obj.TickSize      = datReader.ReadUInt64();
            obj.LightTickSize = datReader.ReadUInt64();

            uint numDayGroups = datReader.ReadUInt32();

            for (uint i = 0; i < numDayGroups; i++)
            {
                obj.DayGroups.Add(DayGroup.Read(datReader));
            }

            return(obj);
        }
Exemple #2
0
        public static DayGroup Read(DatReader datReader)
        {
            DayGroup obj = new DayGroup();

            obj.ChanceOfOccur = datReader.ReadSingle();
            obj.DayName       = datReader.ReadPString();
            datReader.AlignBoundary();

            uint num_sky_objects = datReader.ReadUInt32();

            for (uint i = 0; i < num_sky_objects; i++)
            {
                obj.SkyObjects.Add(SkyObject.Read(datReader));
            }

            uint num_sky_times = datReader.ReadUInt32();

            for (uint i = 0; i < num_sky_times; i++)
            {
                obj.SkyTime.Add(SkyTimeOfDay.Read(datReader));
            }

            return(obj);
        }