Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override void Update(GameTime gameTime)
- {
- base.Update(gameTime);
- // Move Left!
- if (InputManager.IsKeyDown(Keys.A))
- camera.Move(new Vector2(5, 0));
- // Move Right!
- if (InputManager.IsKeyDown(Keys.D))
- camera.Move(new Vector2(-5, 0));
- // Move Down!
- if (InputManager.IsKeyDown(Keys.S))
- camera.Move(new Vector2(0, -5));
- // Move Up!
- if (InputManager.IsKeyDown(Keys.W))
- camera.Move(new Vector2(0, 5));
- // Zoom In
- if (InputManager.IsKeyPressed(Keys.PageUp))
- camera.Zoom += 0.05f;
- // Zoom Out
- if (InputManager.IsKeyPressed(Keys.PageDown))
- camera.Zoom -= 0.05f;
- // Rotate Counter Clockwise
- if (InputManager.IsKeyDown(Keys.J))
- camera.Rotation -= 0.01f;
- // Rotate Clockwise
- if (InputManager.IsKeyDown(Keys.K))
- camera.Rotation += 0.01f;
- }
Advertisement
Add Comment
Please, Sign In to add comment