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

Function drawBullets

bwapi/ExampleAIClient/Source/ExampleAIClient.cpp:231–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void drawBullets()
232{
233 for (auto &b : Broodwar->getBullets())
234 {
235 Position p = b->getPosition();
236 double velocityX = b->getVelocityX();
237 double velocityY = b->getVelocityY();
238 Broodwar->drawLineMap(p, p + Position((int)velocityX, (int)velocityY), b->getPlayer() == Broodwar->self() ? Colors::Green : Colors::Red);
239 Broodwar->drawTextMap(p, "%c%s", b->getPlayer() == Broodwar->self() ? Text::Green : Text::Red, b->getType().c_str());
240 }
241}
242
243void drawVisibilityData()
244{

Callers 1

mainFunction · 0.85

Calls 10

drawLineMapMethod · 0.80
drawTextMapMethod · 0.80
c_strMethod · 0.80
PositionClass · 0.50
getPositionMethod · 0.45
getVelocityXMethod · 0.45
getVelocityYMethod · 0.45
getPlayerMethod · 0.45
selfMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected