public void Update(double elapsedTime) { UpdateCollisions(); _background.Update((float)elapsedTime); _backgroundLayer.Update((float)elapsedTime); _enemyList.ForEach(x => x.Update(elapsedTime)); // Get controls and apply to player character double _x = _input.Controller.LeftControlStick.X; double _y = _input.Controller.LeftControlStick.Y * -1; Vector controlInput = new Vector(_x, _y, 0); if (Math.Abs(controlInput.Length()) < 0.0001) { // If the input is very small, then the player may not be using // a controller;, they might be using the keyboard. if (_input.Keyboard.IsKeyHeld(Keys.Left)) { controlInput.X = -1; } if (_input.Keyboard.IsKeyHeld(Keys.Right)) { controlInput.X = 1; } if (_input.Keyboard.IsKeyHeld(Keys.Up)) { controlInput.Y = 1; } if (_input.Keyboard.IsKeyHeld(Keys.Down)) { controlInput.Y = -1; } } _playerCharacter.Move(controlInput * elapsedTime); }