// Update is called once per frame void LateUpdate() { if (!lineofsight.Spoted()) { lineOfSightVisual.DrawFieldOfView(); lineofsight.CurrFov = lineofsight.Fov; lineofsight.CurrRange = lineofsight.range; LookPatrol(); shooting1.endShooting(); } else if (lineofsight.Spoted()) { lineOfSightVisual.viewMesh.Clear(); lineofsight.CurrRange = AlertedViewRange; lineofsight.CurrFov = 110; shooting1.startShooting(); shooting1.Point(); } }