BWAPI
Public Member Functions
ProductionManager Class Reference

#include <ProductionManager.h>

Inheritance diagram for ProductionManager:
Inheritance graph
[legend]
Collaboration diagram for ProductionManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void update ()
virtual const std::string & getName () const

Detailed Description

Definition at line 10 of file ProductionManager.h.


Member Function Documentation

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();
}

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 Typedefs Enumerations Enumerator Friends Defines