using System;
using EasyTransition;
using UnityEngine;
using UnityEngine.SceneManagement;

public class BtnUtil : MonoBehaviour
{
    public TransitionSettings transition;
    public float transitionTime = 0.5f;
    TransitionManager manager;

    private void Awake()
    {
        Application.targetFrameRate = 120;
    }

    private void Start()
    {
        Application.targetFrameRate = 120;
    }

    private void Update()
    {
        Application.targetFrameRate = 120;
    }

    // Start is called once before the first execution of Update after the MonoBehaviour is created
    public void  LoadSceneMode(string sceneName)
    {
        manager = TransitionManager.Instance();
        manager.Transition(sceneName,transition,transitionTime);
    }public void  LoadSceneMode(int buildIndex)
    {
        manager = TransitionManager.Instance();
        manager.Transition(buildIndex,transition,transitionTime);
    }
}
