Project_Maat/src/Entity.h
trotFunky 67435debe6 Class structure, updated UML
Missing : actual code, decorators
2019-06-06 21:30:39 +02:00

60 lines
885 B
C++

//
// Created by trotfunky on 06/06/19.
//
#ifndef SRC_ENTITY_H
#define SRC_ENTITY_H
#include <SFML/Graphics.hpp>
enum class EntityType
{
Citizen,
Player,
House,
Car,
};
enum class State
{
Moving,
Fleeing,
Waiting,
Idle,
};
enum class Orientation
{
Nort,
East,
South,
West,
};
class Entity
{
public:
Entity();
void render(sf::RenderWindow& renderWindow) const;
void move();
void update();
/// Position of the target of the current action on the map
sf::Vector2i target;
private:
// As it contains position, size and orientation, we do not need anything more
sf::RectangleShape shape;
State currentState;
/// Used with rules : last to update has priority
State nextState;
/// Used with rules : last to update has priority
sf::Vector2i nextTarget;
};
#endif //SRC_ENTITY_H