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

#include <ResourceManager.h>

List of all members.

Public Member Functions

 ~ResourceManager ()
bool needWorker ()
bool hasResources (UnitType type)
bool hasResources (UpgradeType type)
bool hasResources (TechType type)
bool hasResources (int neededMinerals, int neededGas)
void lockResources (UnitType type)
void unlockResources (UnitType type)
void printInfo ()

Static Public Member Functions

static ResourceManagergetInstance ()

Detailed Description

ResourceManager handles the resources and where to spend them. An agent must ask the ResourceManager for permission to build/upgrade/research before issuing the order.

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

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


Constructor & Destructor Documentation

Destructor.


Member Function Documentation

Returns the instance to the BuildPlanner that is currently used.

Here is the caller graph for this function:

Checks if we have enough resources free to build the specified unit.

Here is the call graph for this function:

Here is the caller graph for this function:

Checks if we have enough resources free for the specified upgrade.

Here is the call graph for this function:

Checks if we have enough resources free for the specified research.

Here is the call graph for this function:

bool ResourceManager::hasResources ( int  neededMinerals,
int  neededGas 
)

Checks if we have enough resources free.

Here is the call graph for this function:

Locks resources for use.

Here is the caller graph for this function:

Checks if we need to construct a new worker.

Here is the call graph for this function:

Here is the caller graph for this function:

Shows some debug info on screen.

Here is the call graph for this function:

Unlocks resources for use.

Here is the call graph for this function:


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