예제 #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");
 }
예제 #2
0
파일: Sfx.cs 프로젝트: 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);
     }
 }