Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace SpaceInvaders.Managers
- {
- public static class InputManager
- {
- public static void HandleInput(Player player, List<Bullet> bullets)
- {
- if (Raylib.IsKeyDown(KeyboardKey.Left))
- {
- player.MoveLeft();
- }
- if (Raylib.IsKeyDown(KeyboardKey.Right))
- {
- player.MoveRight();
- }
- if (Raylib.IsKeyPressed(KeyboardKey.Space))
- {
- bullets.Add(player.Shoot());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement