My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Event  
Updated Apr 14, 2011 by AHein...@gmail.com

Class header file: BWAPI/Event.h

Events correspond to AIModule callbacks and can be obtained by calling Game::getEvents.

Methods:

getType

EventType::Enum getType() const;

Returns the type of the Event.

getPosition

Position getPosition() const;

Returns the Position. Used in EventType::NukeDetect.

getText

std::string& getText() const;

Returns the text. Used in EventType::SendText, EventType::ReceiveText, EventType::SaveGame.

getUnit

Unit* getUnit() const;

Returns the unit. Used in EventType::UnitDiscover, EventType::UnitEvade, EventType::UnitCreate, EventType::UnitDestroy, EventType::UnitShow, EventType::UnitHide, EventType::UnitMorph, EventType::UnitRenegade, and EventType::UnitComplete.

getPlayer

Player* getPlayer() const;

Returns the player. Used in EventType::ReceiveText and EventType::PlayerLeft.

isWinner

bool isWinner() const;

Returns true if the BWAPI-controlled player is the winner. Used in EventType::MatchEnd.

Events

The EventType Enum contains the following values, which have been linked with their corresponding AIModule callbacks for more information:


Sign in to add a comment
Powered by Google Project Hosting