void Start() { mg = GameObject.FindWithTag("GameController").GetComponent <Main_Game>(); AudioSource sc = GameObject.FindWithTag("MainCamera").GetComponent <AudioSource>(); sc.Stop(); }
// Use this for initialization void Start () { mg = GameObject.FindWithTag("GameController").GetComponent<Main_Game>(); // TODO: NullRefence here! GameObject.Find ("Resume").GetComponent<Button> ().onClick.AddListener (() => { QuitPauseMenu (); }); GameObject.Find ("Exit").GetComponent<Button> ().onClick.AddListener (() => { QuitToMainMenu (); }); isPauseMenuShown = false; }
// Use this for initialization void Start() { mg = GameObject.FindWithTag("GameController").GetComponent <Main_Game>(); // TODO: NullRefence here! GameObject.Find("Resume").GetComponent <Button> ().onClick.AddListener(() => { QuitPauseMenu(); }); GameObject.Find("Exit").GetComponent <Button> ().onClick.AddListener(() => { QuitToMainMenu(); }); isPauseMenuShown = false; }
private void Make_Instance() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); DontDestroyOnLoad(ScrollView); DontDestroyOnLoad(Canvas); } else { Destroy(gameObject); } }
void Start() { mg = GameObject.FindWithTag("GameController").GetComponent<Main_Game>(); AudioSource sc = GameObject.FindWithTag("MainCamera").GetComponent<AudioSource>(); sc.Stop(); }