Exemplo n.º 1
0
 private void Awake()
 {
     _commonAudioSource        = gameObject.AddComponent <AudioSource>();
     _commonAudioSource.volume = SfxVolume;
     _musicAudioSource         = gameObject.AddComponent <AudioSource>();
     _musicAudioSource.volume  = MusicVolume;
     _database = Resources.Load <SfxDatabase>("Sfx/SfxDatabase");
 }
Exemplo n.º 2
0
Arquivo: Sfx.cs Projeto: atil/ld48
 private void Awake()
 {
     _commonAudioSource        = gameObject.AddComponent <AudioSource>();
     _commonAudioSource.volume = SfxVolume;
     _musicAudioSource         = gameObject.AddComponent <AudioSource>();
     _musicAudioSource.volume  = SfxVolume;
     _database = Resources.Load <SfxDatabase>("Sfx/SfxDatabase");
     if (Camera.main != null)
     {
         transform.SetParent(Camera.main.transform);
     }
 }