|
Event
Class header file: BWAPI/Event.h Events correspond to AIModule callbacks and can be obtained by calling Game::getEvents. Methods: getTypeEventType::Enum getType() const; Returns the type of the Event. getPositionPosition getPosition() const; Returns the Position. Used in EventType::NukeDetect. getTextstd::string& getText() const; Returns the text. Used in EventType::SendText, EventType::ReceiveText, EventType::SaveGame. getUnitUnit* 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. getPlayerPlayer* getPlayer() const; Returns the player. Used in EventType::ReceiveText and EventType::PlayerLeft. isWinnerbool isWinner() const; Returns true if the BWAPI-controlled player is the winner. Used in EventType::MatchEnd. EventsThe EventType Enum contains the following values, which have been linked with their corresponding AIModule callbacks for more information: | |