23 lines
409 B
C++
23 lines
409 B
C++
#ifndef HOLESOME_DIRECTION_H
|
|
#define HOLESOME_DIRECTION_H
|
|
|
|
#include <SFML/Window/Keyboard.hpp>
|
|
#include <SFML/System/Vector2.hpp>
|
|
|
|
enum InputDirection
|
|
{
|
|
NONE = 0,
|
|
UP = 1,
|
|
DOWN = 2,
|
|
LEFT = 4,
|
|
RIGHT = 8
|
|
};
|
|
|
|
class Direction
|
|
{
|
|
public:
|
|
static InputDirection getDirection(sf::Keyboard::Key key);
|
|
static sf::Vector2f getVector(InputDirection direction);
|
|
};
|
|
|
|
#endif //HOLESOME_DIRECTION_H
|