Beispiel #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(),
     });
 }
Beispiel #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;
        }
Beispiel #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);
        }