Action used for respawning entities.
More...
#include <RespawnAction.hpp>
|
| | RespawnAction (std::chrono::system_clock::time_point startTime, std::chrono::milliseconds respawnTime, std::shared_ptr< Entity > pEntity) |
| |
| | ~RespawnAction ()=default |
| |
| void | act () |
| | After time indicated by actionTimeM has passed, moves pEntity to its respawn location and changes hp back to maximum. Implementation of pure virtual method act() of the base class. More...
|
| |
| CurrentAction | getActionInfo () |
| | Returns information about the current action. More...
|
| |
| | 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...
|
| |
Action used for respawning entities.
◆ RespawnAction()
| RespawnAction::RespawnAction |
( |
std::chrono::system_clock::time_point |
startTime, |
|
|
std::chrono::milliseconds |
respawnTime, |
|
|
std::shared_ptr< Entity > |
pEntity |
|
) |
| |
◆ ~RespawnAction()
| RespawnAction::~RespawnAction |
( |
| ) |
|
|
default |
◆ act()
| void RespawnAction::act |
( |
| ) |
|
|
virtual |
After time indicated by actionTimeM has passed, moves pEntity to its respawn location and changes hp back to maximum. Implementation of pure virtual method act() of the base class.
Implements Action.
◆ getActionInfo()
| CurrentAction RespawnAction::getActionInfo |
( |
| ) |
|
|
virtual |
Returns information about the current action.
- Returns
- CurrentAction
Reimplemented from Action.
◆ actionTimeM
| std::chrono::milliseconds RespawnAction::actionTimeM |
|
private |
◆ actionTypeM
| ActionType RespawnAction::actionTypeM = ActionType::Respawn |
|
private |
The documentation for this class was generated from the following files: