![]() |
Dragonfly 4.22
A text-based game engine
|

Public Member Functions | |
| int | startUp () override |
| void | shutDown () override |
| int | registerPathFind (PathFind *p_path_find) |
| int | unregisterPathFind (PathFind *p_path_find) |
| void | setMinCycleTime (int new_min_cycle_time) |
| int | getMinCycleTime () const |
| int | getPathFinders () const |
| void | cycle (int max_cycle_time=-1) |
Public Member Functions inherited from df::Manager | |
| std::string | getType () const |
| virtual int | startUp () |
| virtual void | shutDown () |
| bool | isStarted () const |
| int | onEvent (const Event *p_event) const |
| int | registerInterest (Object *p_o, std::string event_type) |
| int | unregisterInterest (Object *p_o, std::string event_type) |
Static Public Member Functions | |
| static PathManager & | getInstance () |
Private Member Functions | |
| PathManager () | |
| PathManager (PathManager const &) | |
| void | operator= (PathManager const &) |
Private Attributes | |
| std::vector< PathFind * > | m_finder |
| int | m_min_cycle_time |
Additional Inherited Members | |
Protected Member Functions inherited from df::Manager | |
| void | setType (std::string new_type) |
|
private |
Private since a singleton.
|
private |
Don't allow copy.
| void df::PathManager::cycle | ( | int | max_cycle_time = -1 | ) |
Cycle through registered PathFinders.
Spend at least min_cycle time, but no more than max_cycle_time.
|
static |
Get the one and only instance of the PathManager.
| int df::PathManager::getMinCycleTime | ( | ) | const |
Get minimum cycle time (minimum game loop time spent pathfinding).
| int df::PathManager::getPathFinders | ( | ) | const |
Return number of PathFind-ers.
|
private |
Don't allow assignment.
| int df::PathManager::registerPathFind | ( | PathFind * | p_path_find | ) |
Register PathFind with PathManager.
Return 0 if ok, else -1.
| void df::PathManager::setMinCycleTime | ( | int | new_min_cycle_time | ) |
Set minimum cycle time (minimum game loop time spent pathfinding).
|
overridevirtual |
Shut down PathManager.
Reimplemented from df::Manager.
|
overridevirtual |
Start up PathManager.
Set min cycle time default to 1/10 frame time.
Reimplemented from df::Manager.
| int df::PathManager::unregisterPathFind | ( | PathFind * | p_path_find | ) |
Unregister PathFind with PathManager.
Return 0 if ok, else -1.
|
private |
Min pathfinding time, in millisec.