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

public class PoliceCarManager : MonoBehaviour
{

    public PolceCarScript[] policeCars;
    public Transform playerTransform;

    public float xCoordinate;
    bool isEnabled;

    private void Update()
    {
        
        if (!isEnabled && playerTransform.position.x <= xCoordinate)
        {
            Debug.Log("police car manager trigger hit");
            for (int i = 0; i < policeCars.Length; ++i)
            {
                policeCars[i].enabled = true;
            }

            isEnabled = true;
        }

    }
}
