17 Action(std::chrono::system_clock::time_point startTime, std::shared_ptr<Entity> pEntity);
60 virtual void act() = 0;
65 std::chrono::milliseconds
actionTimeM = std::chrono::milliseconds(0);
Represents an action that an entity can perform.
Definition: Action.hpp:15
ActionType actionTypeM
Definition: Action.hpp:67
virtual CurrentAction getActionInfo()
Returns information about the current action. This is used to send information to the client.
Definition: Action.cpp:23
std::chrono::milliseconds actionTimeM
Definition: Action.hpp:65
std::chrono::system_clock::time_point startTimeM
Definition: Action.hpp:63
std::chrono::system_clock::time_point getStartTime()
Get the time when the action started.
Definition: Action.cpp:8
Action(std::chrono::system_clock::time_point startTime, std::shared_ptr< Entity > pEntity)
Definition: Action.cpp:6
ActionType getActionType()
Get the ActionType object.
Definition: Action.cpp:18
std::shared_ptr< Entity > pEntityM
Definition: Action.hpp:69
bool completedM
Definition: Action.hpp:71
virtual void act()=0
Functionality for the action, pure virtual function that needs to be implemented by derived classes....
bool isCompleted()
Returns true if the action is completed.
Definition: Action.cpp:33
std::chrono::milliseconds getActionTime()
Get the time how long a single iteration of the action takes.
Definition: Action.cpp:13
Base pure virtual Entity class. Different types of enities inherit this.
Definition: Entity.hpp:17