Ejemplo n.º 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(),
     });
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }