Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="recorder"></param>
        /// <param name="serializer"></param>
        /// <returns></returns>
        public static InputRecord.Frame WriteToFrame(this IFrameDataRecorder recorder, ISerializer serializer)
        {
            Assert.IsNotNull(serializer);

            var frame = new InputRecord.Frame();

            frame.InputText = serializer.Serialize(recorder);
            return(frame);
        }
Esempio n. 2
0
        /// <summary>
        /// フレームのデータを復元します
        /// この関数を呼び出した後は、このインスタンスとReplayableInputのパラメータがFrameのものへ更新されます。
        /// </summary>
        /// <param name="recorder"></param>
        /// <param name="frame"></param>
        /// <param name="serializer"></param>
        public static void RecoverFromFrame(this IFrameDataRecorder recorder, InputRecord.Frame frame, ISerializer serializer)
        {
            Assert.IsNotNull(frame);
            Assert.IsNotNull(serializer);

            var recoverInput = serializer.Deserialize(frame.InputText, recorder.GetType())
                               as IFrameDataRecorder;

            recoverInput.CopyUpdatedDatasTo(recorder);
        }
Esempio n. 3
0
            public void CopyUpdatedDatasTo(IFrameDataRecorder other)
            {
                Assert.IsTrue(other is TestRecorder);

                var otherRecorder = other as TestRecorder;

                if (_value.DidUpdated)
                {
                    otherRecorder._value.Value = _value.Value;
                }
            }
            /// <summary>
            ///
            /// </summary>
            /// <param name="frameDataRecorder"></param>
            public void CopyUpdatedDatasTo(IFrameDataRecorder other)
            {
                var inst = other as DummyFrameDataRecorder;

                inst._dummyData.Value = DummyData;
            }
Esempio n. 5
0
            public void CopyUpdatedDatasTo(IFrameDataRecorder other)
            {
                var r = other as TestFrameDataRecorder;

                r._touchCount.Value = TouchCount;
            }
Esempio n. 6
0
            public void CopyUpdatedDatasTo(IFrameDataRecorder other)
            {
                var otherRecoder = other as TestRecorder;

                otherRecoder.Value.Value = Value.Value;
            }