|
BWAPI
|
#include <SpottedObject.h>
Public Member Functions | |
| SpottedObject () | |
| SpottedObject (Unit *mUnit) | |
| SpottedObject (Position pos) | |
| bool | isActive () |
| void | setInactive () |
| int | getUnitID () |
| UnitType | getType () |
| Position | getPosition () |
| TilePosition | getTilePosition () |
| bool | isAt (TilePosition tilePos) |
| double | getDistance (Position pos) |
| double | getDistance (TilePosition tilePos) |
The SpottedObject class is a help class for the ExplorationManager. It contains all details about a spotted enemy unit or neutral resource.
Author: Johan Hagelback (johan.hagelback@gmail.com)
Default constructor. Should not be used.
| SpottedObject::SpottedObject | ( | Unit * | mUnit | ) |
Creates an object from a unit reference.

Creates a spotted object from an interesting position.
| double SpottedObject::getDistance | ( | Position | pos | ) |
Returns the distance between the spotted object and a position


| double SpottedObject::getDistance | ( | TilePosition | tilePos | ) |
Returns the distance between the spotted object and a tileposition

Returns the position of the spotted unit.

Returns the tileposition of the spotted unit.

Returns the type of the spotted unit.

| int SpottedObject::getUnitID | ( | ) |
Returns the unique id of the spotted unit.
| bool SpottedObject::isActive | ( | ) |
Returns true if this SpottedObject is active, false if not.

| bool SpottedObject::isAt | ( | TilePosition | tilePos | ) |
Returns true if the SpottedObject is at this TilePosition.

| void SpottedObject::setInactive | ( | ) |
Sets this SpottedObject as inactive, i.e. it is probably destroyed.
1.7.6.1