Exemplo n.º 1
0
void ArbiterAgent::computeActions()
{
	if (chargeShields())
	{
		return;
	}

	NavigationAgent::getInstance()->computeMove(this, goal, true);
}
Exemplo n.º 2
0
void DragoonAgent::computeActions()
{
	if (chargeShields())
	{
		return;
	}

	defensive = false;
	if (unit->getAirWeaponCooldown() > 2 || unit->getGroundWeaponCooldown() > 2) defensive = true;
	
	NavigationAgent::getInstance()->computeMove(this, goal, defensive);
	if (!defensive) TargetingAgent::checkTarget(this);
}
Exemplo n.º 3
0
void ScoutAgent::computeActions()
{
	//Necessary to avoid cancelling attacks
	if (unit->isAttacking() || unit->isStartingAttack()) return;

	if (chargeShields()) return;
	
	defensive = false;
	if (unit->getAirWeaponCooldown() > 2 || unit->getGroundWeaponCooldown() > 2) defensive = true;
	
	if (TargetingAgent::checkTarget(this)) return;

	NavigationAgent::getInstance()->computeMove(this, goal, defensive);
}
Exemplo n.º 4
0
void DarkTemplarAgent::computeActions()
{
	//Necessary to avoid cancelling attacks
	if (unit->isAttacking() || unit->isStartingAttack()) return;

	if (chargeShields()) return;

	defensive = false;
	if (!unit->isCloaked() || unit->isVisible()) defensive = true;
	
	if (TargetingAgent::checkTarget(this)) return;

	NavigationAgent::getInstance()->computeMove(this, goal, defensive);
}