using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ValidateAccessToDataCenter : MonoBehaviour
{

    [SerializeField]
    private List<Toggle> checkboxes = new List<Toggle>();
    [SerializeField]
    private GameObject arrow;


    // Start is called before the first frame update
    void Start()
    {
        arrow.SetActive(false);
        foreach (var a in checkboxes)
        {
            a.isOn = false;
        }
    }

    private void Update()
    {
        int cmp = 0;
        foreach (var a in checkboxes)
        {
            if (a.isOn) cmp++;
        }

        if(cmp == checkboxes.Count)
        {
            arrow.SetActive(true);
        }
        else
        {
            arrow.SetActive(false);
        }
    }
}
