BWAPI
|
#include <ExistenceTest.h>
Public Member Functions | |
virtual void | onStart () |
virtual void | onFrame () |
virtual void | onUnitCreate (BWAPI::Unit *unit) |
virtual void | onUnitDestroy (BWAPI::Unit *unit) |
void ExistenceTest::onFrame | ( | ) | [virtual] |
BWAPI calls this on every logical frame in the game.
Reimplemented from TestModule.
void ExistenceTest::onStart | ( | ) | [virtual] |
BWAPI calls this at the start of a match. Typically an AI will execute set up code in this method (initialize data structures, load build orders, etc).
Reimplemented from BWAPI::AIModule.
void ExistenceTest::onUnitCreate | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit is created. Note that this is NOT called when a unit changes type (such as larva into egg or egg into drone). Building a refinery/assimilator/extractor will not produce an onUnitCreate call since the vespene geyser changes to the unit type of the refinery/assimilator/extractor. If Complete Map Information is enabled, this will also be called for new units that are hidden by the fog of war. If the unit is visible upon creation, onUnitShow will be called shortly after onUnitCreate is called.
Reimplemented from TestModule.
void ExistenceTest::onUnitDestroy | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit dies or otherwise removed from the game (i.e. a mined out mineral patch). When a zerg drone becomes an extractor, the Vespene geyser changes to the Zerg Extractor type and the drone is removed. If Complete Map Information is enabled, this will also be called for units that are hidden by the fog of war. If a unit that was visible gets destroyed, onUnitHide will be called right before onUnitDestroy is called.
Reimplemented from TestModule.