Пример #1
0
        public void Read(AssetReader reader)
        {
            DeltaPose.Read(reader);
            StartX.Read(reader);
            if (HasStopX(reader.Version))
            {
                StopX.Read(reader);
            }
            LeftFootStartX.Read(reader);
            RightFootStartX.Read(reader);

            if (HasMotion(reader.Version))
            {
                MotionStartX.Read(reader);
                MotionStopX.Read(reader);
            }

            if (IsVector3(reader.Version))
            {
                AverageSpeed.Read3(reader);
            }
            else
            {
                AverageSpeed.Read(reader);
            }

            Clip.Read(reader);

            StartTime          = reader.ReadSingle();
            StopTime           = reader.ReadSingle();
            OrientationOffsetY = reader.ReadSingle();
            Level               = reader.ReadSingle();
            CycleOffset         = reader.ReadSingle();
            AverageAngularSpeed = reader.ReadSingle();

            IndexArray = reader.ReadInt32Array();
            if (HasAdditionalCurveIndexArray(reader.Version))
            {
                AdditionalCurveIndexArray = reader.ReadInt32Array();
            }
            ValueArrayDelta = reader.ReadAssetArray <ValueDelta>();

            if (HasValueArrayReferencePose(reader.Version))
            {
                ValueArrayReferencePose = reader.ReadSingleArray();
            }

            Mirror = reader.ReadBoolean();
            if (HasLoopTime(reader.Version))
            {
                LoopTime = reader.ReadBoolean();
            }
            LoopBlend            = reader.ReadBoolean();
            LoopBlendOrientation = reader.ReadBoolean();
            LoopBlendPositionY   = reader.ReadBoolean();
            LoopBlendPositionXZ  = reader.ReadBoolean();

            if (HasStartAtOrigin(reader.Version))
            {
                StartAtOrigin = reader.ReadBoolean();
            }

            KeepOriginalOrientation = reader.ReadBoolean();
            KeepOriginalPositionY   = reader.ReadBoolean();
            KeepOriginalPositionXZ  = reader.ReadBoolean();
            HeightFromFeet          = reader.ReadBoolean();
            reader.AlignStream();
        }