示例#1
0
        public static void SetVolume(int volume)
        {
            SoundMgr soundMgr = GameMain.Instance.SoundMgr;

            audiosource.outputAudioMixerGroup = soundMgr.mix_mgr[AudioMixerMgr.Group.Dance];
            audiosource.volume = (float)volume;
            audiosource.mute   = false;
            soundMgr.SetVolumeDance(volume);
            soundMgr.Apply();
        }
示例#2
0
        /// <summary>
        /// ダンスボリューム設定
        /// </summary>
        public void SetVolumeDance(int volume, bool isDance)
        {
            var bgm   = soundMgr.GetAudioSourceBgm();
            var group = isDance ? AudioMixerMgr.Group.Dance : AudioMixerMgr.Group.BGM;

            bgm.outputAudioMixerGroup = soundMgr.mix_mgr[group];
            //mgr.SetVolume(AudioSourceMgr.Type.Bgm, volume);
            soundMgr.SetVolumeDance(volume);
            soundMgr.Apply();
        }