Implemented move function for entities
Does not consider speed (TODO ?)
This commit is contained in:
parent
3666b9e7e9
commit
dafc442512
2 changed files with 27 additions and 11 deletions
10
src/Entity.h
10
src/Entity.h
|
@ -29,10 +29,10 @@ enum class State
|
|||
|
||||
enum class Orientation
|
||||
{
|
||||
Nort,
|
||||
East,
|
||||
South,
|
||||
West,
|
||||
Nort = 0,
|
||||
East = 90,
|
||||
South = 180,
|
||||
West = 270,
|
||||
};
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
Entity(int x, int y, EntityType type, sf::Texture* texture, int width = 1, int height = 1);
|
||||
explicit Entity(const pugi::xml_node& entityNode, sf::Texture* texture);
|
||||
|
||||
void move();
|
||||
void move(Orientation orientation);
|
||||
void update();
|
||||
|
||||
const sf::RectangleShape& getShape() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue