BWAPI
Public Member Functions | Static Public Member Functions
PFManager Class Reference

#include <PFManager.h>

List of all members.

Public Member Functions

 ~PFManager ()
void computeAttackingUnitActions (BaseAgent *agent, TilePosition goal, bool defensive)
void computeAttackingUnitActions (BaseAgent *agent, TilePosition goal, bool defensive, bool forceMove)
void computeMedicUnitActions (BaseAgent *agent)
bool moveToGoal (BaseAgent *agent, TilePosition goal)

Static Public Member Functions

static PFManagergetInstance ()

Detailed Description

In the bot unit navigation uses two techniques; if no enemy units are close units navigate using the built in pathfinder in Starcraft. If enemy units are close, own units uses potential fields to engage and surround the enemy. The PFManager class is the main class for the potential fields navigation system, and it shall be used compute and execute movement orders using potential fields.

The PFManager is implemented as a singleton class. Each class that needs to access PFManager can request an instance, and all classes shares the same PFManager instance.

Author: Johan Hagelback (johan.hagelback@gmail.com)


Constructor & Destructor Documentation

Destructor


Member Function Documentation

void PFManager::computeAttackingUnitActions ( BaseAgent agent,
TilePosition  goal,
bool  defensive 
)

Is used to compute and execute movement commands for attacking units using the potential field navigation system.

Here is the caller graph for this function:

void PFManager::computeAttackingUnitActions ( BaseAgent agent,
TilePosition  goal,
bool  defensive,
bool  forceMove 
)

Is used to compute and execute movement commands for attacking units using the potential field navigation system. If forceMove is set to true, units always move even if they can attack.

Here is the call graph for this function:

Is used to compute and execute movement commands for Medic units using the potential field navigation system.

Here is the call graph for this function:

Returns the instance to the class.

Here is the caller graph for this function:

bool PFManager::moveToGoal ( BaseAgent agent,
TilePosition  goal 
)

Moves a unit to the specified goal using the pathfinder, and stops at a distance where the potential field navigation system should be used instead.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines