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

public class BossLimbsCounter : MonoBehaviour
{
    [SerializeField]
    private int m_bossLimbsCut = 0;

    [SerializeField]
    private Transform m_endScreen;

    public int BossLimbsCut => m_bossLimbsCut;

    [SerializeField]
    private Animator m_bossAnimator;

    public bool bossWasSeen = false;

    public void BossLimbCut()
    {
        m_bossLimbsCut++;

        if (m_bossLimbsCut >= 3)
        {
            Debug.Log("Yahoo you win!!!");
            m_bossAnimator.SetBool("bossDied", true);
            StartCoroutine("BossKilled");
        }
    }

    IEnumerator BossKilled()
    {
        yield return new WaitForSeconds(3);
        // SceneManager.LoadScene("MainMenu");
        m_endScreen.gameObject.SetActive(true);
    }

}
