#include <map_actions.h>
Inheritance diagram for hoa_map::private_map::ActionRandomMove:


Public Member Functions | |
| ActionRandomMove (VirtualSprite *sprite) | |
| void | Execute () |
| Executes the sprite's action. | |
| ~ActionRandomMove () | |
Public Attributes | |
| uint32 | direction_timer |
| A timer which keeps track of how long the sprite has been moving around since the last change in direction. | |
| uint32 | movement_timer |
| A timer which keeps track of how long the sprite has moved about randomly. | |
| uint32 | total_direction_time |
| The amount of time (in milliseconds) that the sprite should continue moving in one direction The default value for this timer is two seconds (2000ms). | |
| uint32 | total_movement_time |
| The amount of time to perform random movement before ending this action Set this member to hoa_system::INFINITE_TIME in order to continue the random movement forever. The default value of this member will be set to 10 seconds if it is not specified. | |
| MapZone * | zone |
| A pointer to the map zone, if any, that the sprite should constrain their random movement to. TODO: has not yet been implemented. | |
****************************************************************************
This class has several parameters that can be set to define the random movement. These parameters include, for example, the amount of time to move randomly before proceeding to the sprite's next action, any temporary changes in movement speed during the random movement, whether the sprite's position should be confined to a specific map zone, etc.
Definition at line 138 of file map_actions.h.
| hoa_map::private_map::ActionRandomMove::ActionRandomMove | ( | VirtualSprite * | sprite | ) | [inline] |
Definition at line 165 of file map_actions.h.
| hoa_map::private_map::ActionRandomMove::~ActionRandomMove | ( | ) | [inline] |
Definition at line 168 of file map_actions.h.
| void hoa_map::private_map::ActionRandomMove::Execute | ( | ) | [virtual] |
Executes the sprite's action.
Implements hoa_map::private_map::SpriteAction.
Definition at line 91 of file map_actions.cpp.
References hoa_map::private_map::SpriteAction::_finished, hoa_map::private_map::SpriteAction::_sprite, direction_timer, hoa_system::GameSystem::GetUpdateTime(), movement_timer, hoa_map::private_map::VirtualSprite::moving, hoa_map::private_map::VirtualSprite::SetRandomDirection(), hoa_system::SystemManager, total_direction_time, and total_movement_time.
Here is the call graph for this function:

A timer which keeps track of how long the sprite has been moving around since the last change in direction.
Definition at line 156 of file map_actions.h.
Referenced by Execute().
A timer which keeps track of how long the sprite has moved about randomly.
Definition at line 148 of file map_actions.h.
Referenced by Execute().
The amount of time (in milliseconds) that the sprite should continue moving in one direction The default value for this timer is two seconds (2000ms).
Definition at line 153 of file map_actions.h.
Referenced by Execute().
The amount of time to perform random movement before ending this action Set this member to hoa_system::INFINITE_TIME in order to continue the random movement forever. The default value of this member will be set to 10 seconds if it is not specified.
Definition at line 145 of file map_actions.h.
Referenced by Execute().
A pointer to the map zone, if any, that the sprite should constrain their random movement to. TODO: has not yet been implemented.
Definition at line 161 of file map_actions.h.
1.5.1