/// <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()); }
void Play(BGMID id) { this.bgmSource.clip = this.bgm[(int)id]; this.bgmSource.Play(); }
public static void PlayBGM(BGMID id) { Instance.Play(id); }
public static void PlayBGM(BGMID id) { PlayBGM(Instance.bgmClips[(int)id]); }