|
Rehti MMORPG
1.0.0
Rehti MMORPG is a free and open source MMORPG game.
|
Action used for moving. More...
#include <MoveAction.hpp>


Public Member Functions | |
| MoveAction (std::chrono::system_clock::time_point startTime, Coordinates target, std::shared_ptr< Entity > pEntity) | |
| ~MoveAction ()=default | |
| Coordinates | getTarget () |
| Returns the target location of the action. More... | |
| virtual void | act () |
| Movement functionality, which finds the shortest path to target location and performs the movement there. Implementation of pure virtual method act() of the base class. More... | |
| CurrentAction | getActionInfo () |
| Returns information about the current action. More... | |
Public Member Functions inherited from Action | |
| Action (std::chrono::system_clock::time_point startTime, std::shared_ptr< Entity > pEntity) | |
| ~Action ()=default | |
| std::chrono::system_clock::time_point | getStartTime () |
| Get the time when the action started. More... | |
| std::chrono::milliseconds | getActionTime () |
| Get the time how long a single iteration of the action takes. More... | |
| ActionType | getActionType () |
| Get the ActionType object. More... | |
| bool | isCompleted () |
| Returns true if the action is completed. More... | |
Static Public Member Functions | |
| static const std::chrono::milliseconds | getMoveTime () |
| Get the Move Time object. More... | |
Protected Attributes | |
| Coordinates | targetM |
| std::vector< std::pair< int, int > > | pathM |
| std::optional< Coordinates > | nextMoveM |
| Next move to be taken. Stores the first element of pathM, after its deleted. Ww need this to be able to tell the client where we are moving next. More... | |
| std::chrono::milliseconds | actionTimeM |
| ActionType | actionTypeM = ActionType::Move |
Protected Attributes inherited from Action | |
| std::chrono::system_clock::time_point | startTimeM |
| std::chrono::milliseconds | actionTimeM = std::chrono::milliseconds(0) |
| ActionType | actionTypeM = ActionType::None |
| std::shared_ptr< Entity > | pEntityM |
| bool | completedM = false |
Action used for moving.
| MoveAction::MoveAction | ( | std::chrono::system_clock::time_point | startTime, |
| Coordinates | target, | ||
| std::shared_ptr< Entity > | pEntity | ||
| ) |
|
default |
|
virtual |
Movement functionality, which finds the shortest path to target location and performs the movement there. Implementation of pure virtual method act() of the base class.
Implements Action.
Reimplemented in PickUpAction.
|
virtual |
|
static |
Get the Move Time object.
| Coordinates MoveAction::getTarget | ( | ) |
Returns the target location of the action.
|
protected |
|
protected |
|
protected |
Next move to be taken. Stores the first element of pathM, after its deleted. Ww need this to be able to tell the client where we are moving next.
|
protected |
|
protected |