how do i check if all booleans in an array are false? C#

Hi guys, i have a bunch of scripts on my enemys that have a PlayerVisable Boolean. I’ve managed to get all these booleans into an array on my player script, and basically all i want to do is check if any enemy’s see me, and if they do, set my players Alert Boolean to true. it seems really simple but i cant seem to figure out just how it works. thanks so much for your help

using UnityEngine;
using System.Collections;
using System.Linq;

public class Player_manager : MonoBehaviour {

    public Transform PlayerCam;
	public float Speed;
	Rigidbody RB;
	public bool Alert;
	public GameObject[] enemys;
	public Enemy_FOV[] enemyFOV;
	public bool[] enemyAlert;

	// Use this for initialization
	void Start () {
		RB = gameObject.GetComponent<Rigidbody> ();



    
	}
	
	// Update is called once per frame
	void Update () {

		enemys = GameObject.FindGameObjectsWithTag ("Enemy");

		enemyFOV = new Enemy_FOV[enemys.Length];

		for(int i = 0; i < enemys.Length; i++){

			enemyFOV <em>=enemys*.GetComponent<Enemy_FOV> ();*</em>

* }*

* enemyAlert = new bool[enemyFOV.Length];*
* for(int i = 0; i < enemyFOV.Length; i++){*

enemyAlert =enemyFOV*.playerVisable;*

* }*

* if (Input.GetButtonUp (“Fire1”)) {*
* Jump_Start ();
_ }*_

* }*
so basically i just want to make Alert true, when any of the enemyAlert array bools are true.

You can loop through all the elements in the array and return once you’ve found one that’s true.

Here:

    bool isAlert(bool[] enemyAlert)
    {
        for (int i = 0; i < enemyAlert.Length; i++)
        {
            if (enemyAlert*)*

{
return enemyAlert*;*
}
}
return false;
}
This will loop through the bools and return true if one of them is true.
You can call the function like this:
Alert = isAlert(enemyAlert);

You can also do

bool isAlert = enemyAlert.Any(x => x);