Arcade architecture
IEntity.hpp
Go to the documentation of this file.
1
14#ifndef IENTITY_HPP_
15#define IENTITY_HPP_
16
25class IEntity {
26 public:
30 IEntity() = default;
31
35 ~IEntity() = default;
36
42 virtual void onClick() = 0;
43
50 virtual void moveEntity() = 0;
51
57 virtual void onInteract() = 0;
58
64 virtual std::pair<size_t, size_t> getPosition() const = 0;
65
71 virtual void setPosition(std::pair<size_t, size_t> position) = 0;
72
78 virtual std::pair<size_t, size_t> getSize() const = 0;
79
85 virtual std::string getSpriteName() const = 0;
86
92 virtual std::size_t getColor() const = 0;
93
100 virtual std::size_t getZIndex() const = 0;
101
107 virtual bool isMovable() const = 0;
108};
109#endif /* !IENTITY_HPP_ */
Abstract interface for entities.
Definition: IEntity.hpp:25
virtual std::string getSpriteName() const =0
Gets the sprite name of the entity.
virtual std::pair< size_t, size_t > getSize() const =0
Gets the size of the entity.
virtual void setPosition(std::pair< size_t, size_t > position)=0
Sets the position of the entity.
virtual void onClick()=0
Handles the click event on the entity.
virtual bool isMovable() const =0
Checks if the entity is movable.
virtual void moveEntity()=0
Moves the entity.
virtual std::size_t getZIndex() const =0
Gets the z-index of the entity.
virtual std::pair< size_t, size_t > getPosition() const =0
Gets the position of the entity.
virtual std::size_t getColor() const =0
Gets the color of the entity.
~IEntity()=default
Default destructor for IEntity.
IEntity()=default
Default constructor for IEntity.
virtual void onInteract()=0
Handles interaction with the entity.