void Attack(AiController controller) { if (controller.CheckActionTimer(countDown)) { //Debug.DrawRay(controller.transform.position, controller.Shooting.GetMuzzleDirection() * 90, Color.green); if (Physics.SphereCast(controller.transform.position, rayRadius, controller.Shooting.GetMuzzleDirection(), out RaycastHit hit, layerMask)) { controller.Shooting.Shoot(); } } }
bool SearchForPlayer(AiController controller) { if (!controller.Movement.IsMoving()) { if (controller.CheckActionTimer(decisionTimer)) { controller.TrackPlayer(false); return(true); } } return(false); }