Ejemplo n.º 1
0
        public void Import(BinaryReader Reader)
        {
            Bones.Clear();

            UInt32 VersionA = Reader.ReadUInt32();
            UInt32 VersionB = Reader.ReadUInt32();

            if ((VersionA != 4) | (VersionB != 2))
            {

                if (VersionA > 0x1000)
                {
                    return;
                }
                else
                {

                }
            }


            UInt32 BoneCount = Reader.ReadUInt32();

            for (int i = 0; i < BoneCount; i++)
            {
                Resource_RIGBone Temp = new Resource_RIGBone();
                Temp.Import(Reader);
                Bones.Add(Temp);
            }

            foreach (Resource_RIGBone Entry in Bones)
            {
                if (Entry.GetParentIndex() != -1)
                {
                    Entry.SetParent(Bones[(int)Entry.GetParentIndex()]);
                }
            }

            UInt32 NameLen = Reader.ReadUInt32();
            Name = Encoding.ASCII.GetString(Reader.ReadBytes((int)NameLen));

            UInt32 ChainLength = Reader.ReadUInt32();
        }
 public void SetParent(Resource_RIGBone Parent)
 {
     this.Parent = Parent;
 }