public override bool perform(GameObject agent) { if (timeBetweenAttacks <= 0f) { timeBetweenAttacks -= Time.deltaTime; } else { aILogic.agent.isStopped = true; if (stopAndShootTime > 0f) { Debug.Log("...ATTACKING"); for (int i = 0; i < enemiesInImmediateDistance.Count; i++) { aILogic.Attack(enemiesInImmediateDistance[i].transform); } isComplete = true; aILogic.agent.isStopped = false; return(true); } else { stopAndShootTime -= Time.deltaTime; } } return(false); }