KeyPressed.h 584 B

1234567891011121314151617181920212223242526
  1. /*
  2. * 2D Game Engine
  3. * KeyPressed.h:
  4. * Based on pikuma.com 2D game engine in C++ and Lua course
  5. * Copyright (c) 2021 986-Studio. All rights reserved.
  6. *
  7. * Created by Manoël Trapier on 16/02/2021.
  8. */
  9. #ifndef GAMEENGINE_SOURCE_INCLUDE_EVENTS_KEYPRESSED_H
  10. #define GAMEENGINE_SOURCE_INCLUDE_EVENTS_KEYPRESSED_H
  11. #include <stdint.h>
  12. #include <SDL.h>
  13. #include <Event.h>
  14. class KeyPressedEvent : public Event
  15. {
  16. public:
  17. SDL_Keycode keyCode;
  18. explicit KeyPressedEvent(SDL_Keycode keyCode) : keyCode(keyCode) {};
  19. };
  20. #endif /* GAMEENGINE_SOURCE_INCLUDE_EVENTS_KEYPRESSED_H */