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

Method attack

bwapi/BWAPILIB/UnitCommand.cpp:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 , type(_type)
22 {}
23 UnitCommand UnitCommand::attack(Unit unit, Position target, bool shiftQueueCommand)
24 {
25 UnitCommand c{ unit, UnitCommandTypes::Attack_Move };
26 c.assignTarget(target);
27 c.extra = shiftQueueCommand ? 1 : 0;
28 return c;
29 }
30 UnitCommand UnitCommand::attack(Unit unit, Unit target, bool shiftQueueCommand)
31 {
32 UnitCommand c{ unit, UnitCommandTypes::Attack_Unit };

Callers 7

RunMilitaryControllerMethod · 0.45
DoUnitBehaviourMethod · 0.45
RunJunkYardDogMethod · 0.45
onFrameMethod · 0.45
startMethod · 0.45
startMethod · 0.45
onFrameMethod · 0.45

Calls 1

assignTargetMethod · 0.80

Tested by 4

onFrameMethod · 0.36
startMethod · 0.36
startMethod · 0.36
onFrameMethod · 0.36