MiniGames/Assets/Scripts/Shared/SceneSelector.cs

19 lines
418 B
C#
Raw Permalink Normal View History

2025-07-11 15:42:48 +05:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneSelector : MonoBehaviour
{
public void LoadScene(int index)
{
2025-09-22 17:26:19 +05:00
Time.timeScale = 1;
2025-07-11 15:42:48 +05:00
SceneManager.LoadScene(index);
}
2025-07-14 19:30:52 +05:00
public void Restart()
{
Time.timeScale = 1;
2025-07-14 19:30:52 +05:00
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
2025-07-11 15:42:48 +05:00
}