BTHAI 2.3
Public Member Functions
SpottedObject Class Reference

#include <SpottedObject.h>

List of all members.

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)

Detailed Description

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)


Constructor & Destructor Documentation

SpottedObject::SpottedObject ( )

Default constructor. Should not be used.

SpottedObject::SpottedObject ( Unit *  mUnit)

Creates an object from a unit reference.

SpottedObject::SpottedObject ( Position  pos)

Creates a spotted object from an interesting position.


Member Function Documentation

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

Position SpottedObject::getPosition ( )

Returns the position of the spotted unit.

TilePosition SpottedObject::getTilePosition ( )

Returns the tileposition of the spotted unit.

UnitType SpottedObject::getType ( )

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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables