0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 13:43:41 +00:00
SDL_Minigame/include/KeyboardController.h

25 lines
490 B
C++

#pragma once
#include "Game.h"
#include "ECS.h"
#include "Components.h"
class KeyboardController : public Component
{
public:
TransformComponent* transform;
const Uint8* keystates = SDL_GetKeyboardState(NULL);
SDL_Scancode up;
SDL_Scancode down;
SDL_Scancode left;
SDL_Scancode right;
KeyboardController();
KeyboardController(SDL_Scancode up, SDL_Scancode down, SDL_Scancode left, SDL_Scancode right);
~KeyboardController();
void init() override;
void update() override;
};