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

public class GameOverLineScript : MonoBehaviour
{
    [SerializeField]
    private float MaxTimeCount = 3f;

    private float TimeCount = 0f;

    [SerializeField]
    GameObject GameOverPanel;
    // Start is calledbefore the first frame update
    void Start()
    {
        GameOverPanel.SetActive(false);      
    }

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

    }

    private void OnTriggerStay2D(Collider2D collision)
    {
        if(collision.gameObject.tag == "Ball")
        {
            GameObject game = GameObject.Find("GameManager");
            game.GetComponent<GameManager>().isGameOver = true;
            GameOverPanel.SetActive(true);
        }
    }
}
