private void UpdateInput() { _keyboardState = _keyboard.GetState(); _oldMouseState = _mouseState; _mouseState = _mouse.GetState(); if (KeyPressed(Keys.Escape)) { Exit(); } if (KeyPressed(Keys.Space)) { _currentSkyBox = (_currentSkyBox + 1) % _skyBoxMaps.Count; _skyBoxMap = _skyBoxMaps[_currentSkyBox]; } if (KeyPressed(Keys.B)) { _skyBox.Dispose(); _skyBox = ToDisposeContent(GeometricPrimitive.Cube.New(GraphicsDevice)); } if (KeyPressed(Keys.D)) { _skyBox.Dispose(); _skyBox = ToDisposeContent(GeometricPrimitive.Sphere.New(GraphicsDevice)); } if (KeyDown(Keys.Home)) { _angleX = _angleY = 0.0f; } if (KeyDown(Keys.Up)) { _angleX -= 0.01f; } if (KeyDown(Keys.Down)) { _angleX += 0.01f; } if (KeyDown(Keys.Left)) { _angleY -= 0.01f; } if (KeyDown(Keys.Right)) { _angleY += 0.01f; } if (_mouseState.LeftButton.Down && _oldMouseState.LeftButton.Down) { _angleY += _mouseState.X - _oldMouseState.X; _angleX += _mouseState.Y - _oldMouseState.Y; } UpdateView(); }
public void Dispose() { _rasterizerWireframe?.Dispose(); _rotationHelperGeometry?.Dispose(); _cylinder?.Dispose(); _cube?.Dispose(); _cone?.Dispose(); _torus?.Dispose(); }
protected override void Dispose(bool disposing) { if (disposing) { _rasterizerWireframe?.Dispose(); _plane?.Dispose(); _wadRenderer?.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { _fontTexture?.Dispose(); _fontDefault?.Dispose(); _rasterizerWireframe?.Dispose(); _vertexBufferVisibility?.Dispose(); _gizmo?.Dispose(); _plane?.Dispose(); _wadRenderer?.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { _fontTexture?.Dispose(); _fontDefault?.Dispose(); _gizmo?.Dispose(); _plane?.Dispose(); _model?.Dispose(); _skinModel?.Dispose(); _wadRenderer?.Dispose(); _vertexBufferVisibility?.Dispose(); } base.Dispose(disposing); }
void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { Effect.Dispose(); mesh.Dispose(); } disposed = true; }
/// <summary> /// Frees resources used by this object when they are no longer needed. /// </summary> public override void Dispose() { primitive.Dispose(); }