MCPcopy Create free account
hub / github.com/bwapi/bwapi / getTilePosition

Method getTilePosition

bwapi/BWAPILIB/Source/Unit.cpp:84–88  ·  view source on GitHub ↗

--------------------------------------------- GET TILE POSITION ------------------------------------------

Source from the content-addressed store, hash-verified

82 }
83 //--------------------------------------------- GET TILE POSITION ------------------------------------------
84 TilePosition UnitInterface::getTilePosition() const
85 {
86 return TilePosition( Position(abs(this->getPosition().x - this->getType().tileWidth() * 32 / 2),
87 abs(this->getPosition().y - this->getType().tileHeight() * 32 / 2)) );
88 }
89 //--------------------------------------------- GET DISTANCE -----------------------------------------------
90 int UnitInterface::getDistance(Position target) const
91 {

Callers 10

canBuildHereFunction · 0.80
canBuildAddonFunction · 0.80
executeCommandMethod · 0.80
onFrameMethod · 0.80
startMethod · 0.80
onFrameMethod · 0.80
startMethod · 0.80
startMethod · 0.80
onFrameMethod · 0.80

Calls 5

tileWidthMethod · 0.80
tileHeightMethod · 0.80
PositionClass · 0.50
getPositionMethod · 0.45
getTypeMethod · 0.45

Tested by 5

onFrameMethod · 0.64
startMethod · 0.64
onFrameMethod · 0.64
startMethod · 0.64
startMethod · 0.64