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