SC2API
An API for AI for StarCraft II
|
The base class for user defined bots. More...
#include <sc2_agent.h>
Public Member Functions | |
ActionInterface * | Actions () |
ActionFeatureLayerInterface * | ActionsFeatureLayer () |
AgentControlInterface * | AgentControl () |
Public Member Functions inherited from sc2::Client | |
const ObservationInterface * | Observation () const |
The ObservationInterface is used to query game state. | |
QueryInterface * | Query () |
The UnitQuery interface is used to issue commands to units. | |
DebugInterface * | Debug () |
The DebugInterface allows a derived class to print text, draw primitive shapes and spawn/destroy units. | |
ControlInterface * | Control () |
const ControlInterface * | Control () const |
void | Reset () |
Public Member Functions inherited from sc2::ClientEvents | |
virtual void | OnGameFullStart () |
Called when a game is started after a load. Fast restarting will not call this. | |
virtual void | OnGameStart () |
Called when a game is started or restarted. | |
virtual void | OnGameEnd () |
Called when a game has ended. | |
virtual void | OnStep () |
virtual void | OnUnitDestroyed (const Unit *) |
virtual void | OnUnitCreated (const Unit *) |
virtual void | OnUnitIdle (const Unit *) |
virtual void | OnUpgradeCompleted (UpgradeID) |
virtual void | OnBuildingConstructionComplete (const Unit *) |
virtual void | OnNydusDetected () |
Called when a nydus is placed. | |
virtual void | OnNuclearLaunchDetected () |
Called when a nuclear launch is detected. | |
virtual void | OnUnitEnterVision (const Unit *) |
virtual void | OnError (const std::vector< ClientError > &, const std::vector< std::string > &={}) |
Called for various errors the library can encounter. See ClientError enum for possible errors. | |
The base class for user defined bots.
ActionInterface* sc2::Agent::Actions | ( | ) |
Interface for issuing actions to units. Actions should be batched via the UnitCommand functions then eventually dispatched with SendActions. If you are stepping the simulation yourself the Step will automatically call SendActions. If your bot is running in real time you must call SendActions yourself.
ActionFeatureLayerInterface* sc2::Agent::ActionsFeatureLayer | ( | ) |
Interface for issuing actions in feature layers.
AgentControlInterface* sc2::Agent::AgentControl | ( | ) |
The AgentControlInterface is only currently used for restarting a game. For internal use.