示例#1
0
 /// <summary>
 /// Gets the BGM prefab path.
 /// </summary>
 /// <returns>The BGM prefab path.</returns>
 /// <param name="bgmID">ID of background music.</param>
 public string GetSoundPrefabPath(BGMID bgmID)
 {
     if (bgmID == BGMID.SIZE)
     {
         Debug.Log("Specified item is not a BGM");
         return(null);
     }
     return(AUDIO_PREFAB_ROOT_PATH + BGM_PREFAB_PREFIX + bgmID.ToString());
 }
示例#2
0
 void Play(BGMID id)
 {
     this.bgmSource.clip = this.bgm[(int)id];
     this.bgmSource.Play();
 }
示例#3
0
 public static void PlayBGM(BGMID id)
 {
     Instance.Play(id);
 }
示例#4
0
 public static void PlayBGM(BGMID id)
 {
     PlayBGM(Instance.bgmClips[(int)id]);
 }