void Awake() { if (ControlSonido.instance == null) { ControlSonido.instance = this; } else { Destroy(this.gameObject); } }
// Use this for initialization void Start() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); if (!musica_sonando) { iniciarMusicaAmbiente(); musica_sonando = true; } } else { Destroy(this.gameObject); } } // fin de start