private void onRepExec(IRepeatedlyExecuteEventArgs args) { // TODO: move to shared code var input = _game.Input; var view = _game.State.Viewport; int rx = _game.Settings.VirtualResolution.Width; int ry = _game.Settings.VirtualResolution.Height; float viewspeed = 100f * (float)args.DeltaTime; float x = view.X; float y = view.Y; if (input.IsKeyDown(Key.Left)) { x -= viewspeed; } if (input.IsKeyDown(Key.Right)) { x += viewspeed; } if (input.IsKeyDown(Key.Up)) { y += viewspeed; } if (input.IsKeyDown(Key.Down)) { y -= viewspeed; } view.X = MathUtils.Clamp(x, _roomBounds.X, _roomBounds.X + _roomBounds.Width - rx); view.Y = MathUtils.Clamp(y, _roomBounds.Y, _roomBounds.Y + _roomBounds.Height - ry); }
private void onRepeatedlyExecute(IRepeatedlyExecuteEventArgs obj) { foreach (var handle in _resizeHandles) { handle.Visit(); } foreach (var handle in _rotateHandles) { handle.Visit(); } _pivotHandle.Visit(); }
private void onRepeatedlyExecute(IRepeatedlyExecuteEventArgs args) { respondToKeyboard(); }