Пример #1
0
 public static PmxDisplayList Parse(BinaryReader br, PmxDocument doc)
 {
     return(new PmxDisplayList
     {
         Name = doc.ReadString(br),
         EnglishName = doc.ReadString(br),
         IsSpecial = br.ReadBoolean(),
         Items = Enumerable.Range(0, br.ReadInt32()).Select(_ => PmxDisplayItem.Parse(br, doc)).ToList(),
     });
 }
Пример #2
0
        public static PmxDisplayItem Parse(BinaryReader br, PmxDocument doc)
        {
            var rt = new PmxDisplayItem
            {
                Kind = (PmxDisplayItemKind)br.ReadByte(),
            };

            rt.Index = rt.Kind == PmxDisplayItemKind.Bone ? doc.ReadIndex(br, PmxIndexKind.Bone) : doc.ReadIndex(br, PmxIndexKind.Morph);

            return rt;
        }
Пример #3
0
        public static PmxDisplayItem Parse(BinaryReader br, PmxDocument doc)
        {
            var rt = new PmxDisplayItem
            {
                Kind = (PmxDisplayItemKind)br.ReadByte(),
            };

            rt.Index = rt.Kind == PmxDisplayItemKind.Bone ? doc.ReadIndex(br, PmxIndexKind.Bone) : doc.ReadIndex(br, PmxIndexKind.Morph);

            return(rt);
        }