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

public class GameManager : MonoBehaviour
{
    [SerializeField] private int scoreOnWinLevel = 3000;
    [HideInInspector] public static GameManager instance;

    private void Awake()
    {
        instance = this;
    }

    private void Start()
    {
        GameEvents.instance.onNextLevelEvent += AddWinScore;
    }

    private void StopGame()
    {
        Time.timeScale = 0;
    }

    private void AddWinScore()
    {
        ScoreKeeper.instance.IncrementScore(scoreOnWinLevel);
    }

    //private void ShortPause()
    //{
    //    StartCoroutine("Pause");
    //}

    //IEnumerator Pause()
    //{
    //    Time.timeScale = 0;
    //    yield return new WaitForSeconds(2);
    //    Time.timeScale = 1;
    //}
}
