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

public class StateController : MonoBehaviour {

    [Header("Respawning")]
    [SerializeField] GameObject player;
    public GameObject spawnPoint;
    [SerializeField] private GameObject deathCanvas;

    void Awake() {
        deathCanvas.SetActive(false);
    }

    public void RespawnPlayer() {
        SetDeathCanvasActive(false);
        Instantiate(player, spawnPoint.transform.position, spawnPoint.transform.rotation);
    }

    public void SetDeathCanvasActive(bool activeState) {
        deathCanvas.SetActive(activeState);
    }
}
