SC2API
An API for AI for StarCraft II
|
The base class for Agent and ReplayObserver. More...
Go to the source code of this file.
Classes | |
class | sc2::ClientEvents |
A set of common events a user can override in their derived bot or replay observer class. More... | |
class | sc2::Client |
The base class for Agent and ReplayObserver. More... | |
struct | sc2::IsVisible |
Enumerations | |
enum | sc2::ClientError { ErrorSC2, InvalidAbilityRemap, sc2::ClientError::InvalidResponse, sc2::ClientError::NoAbilitiesForTag, sc2::ClientError::ResponseNotConsumed, sc2::ClientError::ResponseMismatch, sc2::ClientError::ConnectionClosed, sc2::ClientError::SC2UnknownStatus, SC2AppFailure, sc2::ClientError::SC2ProtocolError, sc2::ClientError::SC2ProtocolTimeout, sc2::ClientError::WrongGameVersion } |
Functions | |
bool | sc2::IsCarryingMinerals (const Unit &unit) |
bool | sc2::IsCarryingVespene (const Unit &unit) |
The base class for Agent and ReplayObserver.
The Client and ClientEvents provides most of the functionality a user would be interested in for examining game state and scripting bots. A user should prefer to inherit from either Agent or ReplayObserver, those classes both inherit from Client.
|
strong |
Errors that the api can encounter, if the OnError event in ClientEvents is overwritten it will contain a list of errors encountered.
bool sc2::IsCarryingMinerals | ( | const Unit & | unit | ) |
Helper function used to discover whether a unit is carrying minerals or not. You could use this function in GetUnits to get all units carrying minerals: Units units = GetUnits(Alliance::Self, IsCarryingMinerals);
unit | The unit. |
observation | Not needed for this function, only exists for Filter parameters, leave nullptr (its default). |
bool sc2::IsCarryingVespene | ( | const Unit & | unit | ) |
Helper function used to discover whether a unit is carrying vespene or not. You could use this function in GetUnits to get all units carrying vespene: Units units = GetUnits(Alliance::Self, IsCarryingVespene);
unit | The unit. |
observation | Not needed for this function, only exists for Filter parameters, leave nullptr (its default). |