/// <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); }
/// <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); }
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; }
public void CopyUpdatedDatasTo(IFrameDataRecorder other) { var r = other as TestFrameDataRecorder; r._touchCount.Value = TouchCount; }
public void CopyUpdatedDatasTo(IFrameDataRecorder other) { var otherRecoder = other as TestRecorder; otherRecoder.Value.Value = Value.Value; }