Ejemplo n.º 1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this);
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
 private void Start()
 {
     _sfxManager = GameObject.Find("SFXManager").GetComponent <SFXManagerScript>();
     GetComponent <Image>().overrideSprite = _sfxManager.SoundMuted ? musicOff : musicOn;
 }