//BGMを再生する public static void PlayBGM(BGM_NAME bgmEnum) { nowBgmEnum = bgmEnum; AudioSource audio = myObj.GetComponent <AudioSource>(); BGMs bgm = bgmDictionary[bgmEnum]; audio.Stop(); audio.clip = bgm.clip; audio.loop = true; audio.volume = nowVolume * bgm.volume; audio.Play(); }
public static void Fade_inPlay(BGM_NAME bgmEnum, float frame) { nowBgmEnum = bgmEnum; BGMs bgms = bgmDictionary[bgmEnum]; myObj.GetComponent <AudioSource>().clip = bgms.clip; myObj.GetComponent <AudioSource>().Play(); updateCurve = feed_inCurve; beginVolume = 0.0f; endVolume = nowVolume * bgmDictionary[nowBgmEnum].volume; myObj.GetComponent <SoundManager>().frame = frame; }