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

public class GameManagerScript : MonoBehaviour {
    [SerializeField] GridManager gridManager;
    CinemachineBrain camBrain;

    static GameManagerScript instance;

    public static GameManagerScript getInstance() {
        return instance;
    }

    private void Start() {
        instance = this;
    }

    private void Awake() {
        gridManager.GenerateStartGrid();
        if (camBrain == null) {
            camBrain = Camera.main.GetComponent<CinemachineBrain>();
        }
    }

    public CinemachineVirtualCamera getActiveCamera() {
        CinemachineVirtualCamera cam = camBrain.ActiveVirtualCamera as CinemachineVirtualCamera;

        return cam;
    }

    public CinemachineTargetGroup getGridTargetGroup() {
        return gridManager.getTargetGroup();
    }
}
