コード例 #1
0
ファイル: BodyStateRecorder.cs プロジェクト: hgrandry/Mgx
 public override void Restore(StateInfo state)
 {
     _body.Position = state.Get<Vector2>("Position");
     _body.Rotation = state.Get<float>("Rotation");
     _body.LinearVelocity = state.Get<Vector2>("LinearVelocity");
     _body.AngularVelocity = state.Get<float>("AngularVelocity");
 }
コード例 #2
0
 private void Restore(StateInfo state)
 {
     Render.Camera.Zoom = state.Get<float>("currentZoom");
     Render.Camera.Position = state.Get<Vector2>("currentPosition");
     _targetZoom = state.Get<float>("targetZoom");
     _previousZoom = state.Get<float>("previousZoom");
     _previousPosition = state.Get<Vector2>("previousPosition");
 }
コード例 #3
0
ファイル: SoundStateRecorder.cs プロジェクト: hgrandry/Mgx
 public override void Restore(StateInfo state)
 {
     _sound.Position = state.Get<Int64>("Position");
 }
コード例 #4
0
ファイル: BodyMouseTracker.cs プロジェクト: hgrandry/Mgx
 public void Restore(StateInfo state)
 {
     _delta = state.Get<Vector2>("_delta");
     Position = state.Get<Vector2>("Position");
 }
コード例 #5
0
ファイル: MouseZoomController.cs プロジェクト: hgrandry/Mgx
 void IStateRecorder.Restore(StateInfo state)
 {
     _currentWheelIndex = state.Get<int>("currentWheelIndex");
     _currentZoom = state.Get<float>("currentZoom");
 }
コード例 #6
0
ファイル: SkyBackground.cs プロジェクト: hgrandry/Mgx
 void IStateRecorder.Restore(StateInfo state)
 {
     _sky.Alpha = state.Get<float>("alpha");
 }
コード例 #7
0
ファイル: Viewport.cs プロジェクト: hgrandry/Mgx
 public void Restore(StateInfo state)
 {
     var width = state.Get<int>("width");
     var height = state.Get<int>("height");
     SetResolution(width, height);
     SetFullScreen(state.Get<bool>("fullScreen"));
 }
コード例 #8
0
ファイル: ResolutionController.cs プロジェクト: hgrandry/Mgx
 public void Restore(StateInfo state)
 {
     _resolutions.CurrentIndex = state.Get<int>("currentResolution");
     Render.Viewport.SetFullScreen(state.Get<bool>("fullScreen"));
 }