public static void SwitchBGM(AudioSource preBGM, AudioSource newBgm, float time) //現在再生中のBGMをフェードアウトで新しいBGMに切り替える { GameObject fadeObj = new GameObject(); fadeObj.AddComponent <BGMFade>(); BGMFade bgmFade = fadeObj.GetComponent <BGMFade>(); bgmFade.preBGM = preBGM; bgmFade.nextBGM = newBgm; bgmFade.fadeTime = time; }
public static void SwitchBGM(AudioSource preBGM, AudioSource newBgmIntro, AudioSource newBGMLoop, float time) //フェードアウトからのイントロ付きループ再生 { GameObject fadeObj = new GameObject(); fadeObj.AddComponent <BGMFade>(); BGMFade bgmFade = fadeObj.GetComponent <BGMFade>(); bgmFade.preBGM = preBGM; bgmFade.introBGM = newBgmIntro; bgmFade.nextBGM = newBGMLoop; bgmFade.fadeTime = time; }
public static void SwitchBGM(AudioSource preBGM, AudioSource newBgm, float time, float OptionVolume) //ゲームオプションの音量調節 { GameObject fadeObj = new GameObject(); fadeObj.AddComponent <BGMFade>(); BGMFade bgmFade = fadeObj.GetComponent <BGMFade>(); bgmFade.preBGM = preBGM; bgmFade.nextBGM = newBgm; bgmFade.fadeTime = time; bgmFade.optionVolume = OptionVolume; }
public static void SwitchBGM(AudioSource preBGM, AudioSource newBgmIntro, AudioSource newBGMLoop, float time, float OptionVolume) { GameObject fadeObj = new GameObject(); fadeObj.AddComponent <BGMFade>(); BGMFade bgmFade = fadeObj.GetComponent <BGMFade>(); bgmFade.preBGM = preBGM; bgmFade.introBGM = newBgmIntro; bgmFade.nextBGM = newBGMLoop; bgmFade.fadeTime = time; bgmFade.optionVolume = OptionVolume; }