Example #1
0
    void Start()
    {
        mg = GameObject.FindWithTag("GameController").GetComponent <Main_Game>();
        AudioSource sc = GameObject.FindWithTag("MainCamera").GetComponent <AudioSource>();

        sc.Stop();
    }
Example #2
0
	// 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;
	}
Example #3
0
    // 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;
    }
Example #4
0
 private void Make_Instance()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
         DontDestroyOnLoad(ScrollView);
         DontDestroyOnLoad(Canvas);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Example #5
0
 void Start()
 {
     mg = GameObject.FindWithTag("GameController").GetComponent<Main_Game>();
     AudioSource sc = GameObject.FindWithTag("MainCamera").GetComponent<AudioSource>();
     sc.Stop();
 }