コード例 #1
0
        public static bool Read(BinaryReader reader, KeyFrameWithInterpolation frame)
        {
            if (!KeyFrame.Read(reader, frame))
            {
                return(false);
            }
            int type = reader.ReadByte();

            if (!Enum.IsDefined(typeof(InterpolationTypes), type))
            {
                return(false);
            }

            frame.m_InterpolationType = (InterpolationTypes)type;
            switch (frame.m_InterpolationType)
            {
            case KeyFrame.InterpolationTypes.Mirrored:
            case KeyFrame.InterpolationTypes.Asymmetric:
            case KeyFrame.InterpolationTypes.Disconnected:
            case KeyFrame.InterpolationTypes.Hold:
                frame.m_Interpolator = ValueTimeCurveInterpolator.Read(reader, frame.m_InterpolationType);
                break;

            default:
                frame.m_Interpolator = null;
                break;
            }
            return(true);
        }
コード例 #2
0
        public static KeyFrame Read(BinaryReader reader, ActorComponent component)
        {
            KeyFrameTrigger frame = new KeyFrameTrigger();

            if (!KeyFrame.Read(reader, frame))
            {
                return(null);
            }
            return(frame);
        }
コード例 #3
0
        public static KeyFrame Read(BinaryReader reader, ActorComponent component)
        {
            KeyFrameActiveChild frame = new KeyFrameActiveChild();

            if (!KeyFrame.Read(reader, frame))
            {
                return(null);
            }
            frame.m_Value = (uint)reader.ReadSingle();
            return(frame);
        }
コード例 #4
0
        public static KeyFrame Read(BinaryReader reader, ActorComponent component)
        {
            KeyFrameCollisionEnabledProperty frame = new KeyFrameCollisionEnabledProperty();

            if (!KeyFrame.Read(reader, frame))
            {
                return(null);
            }
            frame.m_Value = reader.ReadByte() == 1;
            return(frame);
        }
コード例 #5
0
        public static KeyFrame Read(BinaryReader reader, ActorComponent component)
        {
            KeyFrameStringProperty frame = new KeyFrameStringProperty();

            if (!KeyFrame.Read(reader, frame))
            {
                return(null);
            }
            frame.m_Value = Actor.ReadString(reader);
            return(frame);
        }
コード例 #6
0
        public static KeyFrame Read(BinaryReader reader, ActorComponent component)
        {
            KeyFrameDrawOrder frame = new KeyFrameDrawOrder();

            if (!KeyFrame.Read(reader, frame))
            {
                return(null);
            }
            int numOrderedNodes = reader.ReadUInt16();

            frame.m_OrderedNodes = new DrawOrderIndex[numOrderedNodes];
            for (int i = 0; i < numOrderedNodes; i++)
            {
                DrawOrderIndex drawOrder = new DrawOrderIndex();
                drawOrder.nodeIdx       = reader.ReadUInt16();
                drawOrder.order         = reader.ReadUInt16();
                frame.m_OrderedNodes[i] = drawOrder;
            }
            return(frame);
        }