// Start is called before the first frame update void Start() { shipController = FindObjectOfType <ShipController>(); finalObject = GameObject.FindGameObjectWithTag("final_object"); scoreTracker = FindObjectOfType <ScoreTracker>(); planetManager = FindObjectOfType <PlanetManager>(); gameManager = FindObjectOfType <GameManager>(); winScreen = FindObjectOfType <WinScreenUI>(); }
private void Awake() { Instance = this; transform.Find("restartBtn").GetComponent <Button>().onClick.AddListener(() => { GameSceneManager.Load("Level1"); }); transform.Find("quitBtn").GetComponent <Button>().onClick.AddListener(() => { GameSceneManager.Load("MainMenuScene"); PlayerPrefs.SetInt("CurrentScore", 0); }); Hide(); }
private void Awake() { instance = this; gameObject.SetActive(true); }