|
BWAPI
|
#include <ProductionManager.h>


Public Member Functions | |
| void | update () |
| virtual const std::string & | getName () const |
Definition at line 10 of file ProductionManager.h.
| virtual const std::string& ProductionManager::getName | ( | ) | const [inline, virtual] |
Reimplemented from Manager.
Definition at line 15 of file ProductionManager.h.
{
static const std::string name("ProductionMgr");
return name;
}
| void ProductionManager::update | ( | ) | [virtual] |
Reimplemented from Manager.
Definition at line 14 of file ProductionManager.cpp.
References TrainState, and Manager::update().
{
// currently once you put the command center in train state
// it will never transition out of it
// should tell it to be idle at some point, especially if
// you want to build an addon
for (AgentSetIter agent = agents.begin(); agent != agents.end(); agent++)
{
// Tell command centers to produce SCVs
if ((*agent)->getUnit().getType().isResourceDepot())
{
(*agent)->setState(TrainState);
(*agent)->setUnitTypeTarget(UnitTypes::Terran_SCV);
}
}
// Update agents
Manager::update();
}

1.7.6.1