ReadyScript.cs (503B)
1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 using UnityEngine.SceneManagement; 5 6 public class ReadyScript : MonoBehaviour 7 { 8 public int stage; 9 public GameObject stageSelect; 10 11 public void loadScene() 12 { 13 if (PlayerPrefs.HasKey("health")) 14 PublicStatHandler.GetInstance().health = PlayerPrefs.GetInt("health"); 15 SceneManager.LoadScene(stage); 16 } 17 18 public void stageOff() 19 { 20 stageSelect.SetActive(false); 21 } 22 }