KeyPressed.h 560 B

123456789101112131415161718192021222324
  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 <Event.h>
  13. class KeyPressedEvent : public Event
  14. {
  15. public:
  16. uint16_t keyCode;
  17. explicit KeyPressedEvent(uint16_t keyCode) : keyCode(keyCode) {};
  18. };
  19. #endif /* GAMEENGINE_SOURCE_INCLUDE_EVENTS_KEYPRESSED_H */