/// <summary> /// Loads SFX and BGM sound resources. /// </summary> private bool LoadSoundResources() { // Load sound effects for (int sfxIndex = 0; sfxIndex < m_sfxResources.Length; ++sfxIndex) { string sfxPrefabPath = m_soundInfo.GetSoundPrefabPath((SoundInfo.SFXID)sfxIndex); if (!LoadSoundResource(sfxPrefabPath, m_sfxResources, sfxIndex)) { return(false); } } // Load background music for (int bgmIndex = 0; bgmIndex < m_bgmResources.Length; ++bgmIndex) { string bgmPrefabPath = m_soundInfo.GetSoundPrefabPath((SoundInfo.BGMID)bgmIndex); if (!LoadSoundResource(bgmPrefabPath, m_bgmResources, bgmIndex)) { return(false); } } // All sound resources loaded successfully return(true); }