using UnityEngine; using UnityEngine.SceneManagement; public class SceneLoader : MonoBehaviour { public void LoadScene(int sceneIndex) { SceneManager.LoadScene(sceneIndex); EconomyManager.Instance.ResetGold(); // Reset gold PlayerHealth.Instance.ResetCharacterPosition(); // Reset position } public void LoadMainMenu() { SceneManager.LoadScene("MainMenu1"); } public void QuitGame() { Application.Quit(); #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #endif } }