示例#1
0
        public void ReadFromStream(MStreamReader sr)
        {
            SetId = sr.ReadInt32();

            var count = sr.ReadInt32();

            ChildrenBeatmaps = new List <ChildrenBeatmap>();
            for (var i = 0; i < count; i++)
            {
                ChildrenBeatmaps.Add(sr.ReadData <ChildrenBeatmap>());
            }

            RankedStatus = (BeatmapSetOnlineStatus)sr.ReadSByte();

            if (DateTime.TryParse(sr.ReadString(), out var res))
            {
                ApprovedDate = res;
            }

            if (DateTime.TryParse(sr.ReadString(), out res))
            {
                LastUpdate = res;
            }

            if (DateTime.TryParse(sr.ReadString(), out res))
            {
                LastChecked = res;
            }

            Artist     = sr.ReadString();
            Title      = sr.ReadString();
            Creator    = sr.ReadString();
            Source     = sr.ReadString();
            Tags       = sr.ReadString();
            HasVideo   = sr.ReadBoolean();
            Genre      = (Genre)sr.ReadSByte();
            Language   = (Language)sr.ReadSByte();
            Favourites = sr.ReadInt64();
            Disabled   = sr.ReadBoolean();
        }
示例#2
0
 public void ReadFromStream(MStreamReader sr)
 {
     BeatmapId        = sr.ReadInt32();
     ParentSetId      = sr.ReadInt32();
     DiffName         = sr.ReadString();
     FileMd5          = sr.ReadString();
     Mode             = (PlayMode)sr.ReadSByte();
     Bpm              = sr.ReadInt32();
     Ar               = sr.ReadSingle();
     Od               = sr.ReadSingle();
     Cs               = sr.ReadSingle();
     Hp               = sr.ReadSingle();
     TotalLength      = sr.ReadInt32();
     Playcount        = sr.ReadInt32();
     Passcount        = sr.ReadInt32();
     MaxCombo         = sr.ReadInt64();
     DifficultyRating = sr.ReadDouble();
 }