using UnityEngine;
using UnityEngine.SceneManagement;

namespace ScrambleKit.Scene
{
    public class TransitionTimer : MonoBehaviour
    {
        public string SceneToLoad;
        public float TransitionTime;

        private float startTime;

        void Start()
        {
            startTime = Time.time;
        }

        void Update()
        {
            if (Time.time - startTime >= TransitionTime)
                SceneManager.LoadScene(SceneToLoad);
        }
    }
}