Esempio n. 1
0
 public static bool Read(BinaryReader reader, KeyFrameInt frame)
 {
     if (!KeyFrameWithInterpolation.Read(reader, frame))
     {
         return(false);
     }
     frame.m_Value = reader.ReadInt32();
     return(true);
 }
Esempio n. 2
0
        public static KeyFrame Read(BinaryReader reader, ActorComponent component)
        {
            KeyFrameVertexDeform frame = new KeyFrameVertexDeform();

            if (!KeyFrameWithInterpolation.Read(reader, frame))
            {
                return(null);
            }

            ActorImage imageNode = component as ActorImage;

            frame.m_Vertices = new float[imageNode.VertexCount * 2];
            Actor.ReadFloat32Array(reader, frame.m_Vertices);

            imageNode.DoesAnimationVertexDeform = true;

            return(frame);
        }
Esempio n. 3
0
        public static bool Read(BinaryReader reader, KeyFrameNumeric frame)
        {
            if (!KeyFrameWithInterpolation.Read(reader, frame))
            {
                return(false);
            }
            frame.m_Value = reader.ReadSingle();

            /*if(frame.m_Interpolator != null)
             * {
             *      // TODO: in the future, this could also be a progression curve.
             *      ValueTimeCurveInterpolator vtci = frame.m_Interpolator as ValueTimeCurveInterpolator;
             *      if(vtci != null)
             *      {
             *              vtci.SetKeyFrameValue(m_Value);
             *      }
             * }*/
            return(true);
        }