Exemplo n.º 1
0
 public void turnMusicOff()
 {
     if (_instance != null)
     {
         this.gameObject.GetComponent <AudioSource>().Stop();
         Destroy(this.gameObject);
         MusicMenuPlay._instance = null;
     }
 }
Exemplo n.º 2
0
    void Awake()
    {
        if (!_instance)
        {
            _instance = this;
        }

        else
        {
            Destroy(this.gameObject);
        }

        DontDestroyOnLoad(this.gameObject);
    }