示例#1
0
        public void PlayRequest(MusicRequest req, object entry, float time, UnityEngine.Audio.AudioMixerGroup group)
        {
            m_Stop  = false;
            Entry   = entry;
            Request = req;
            Music   = req.Music;
            Music.AddRef();

            m_Object.SetActive(true);

            m_Source.clip = Music.Clip;
            m_Source.outputAudioMixerGroup = group;
            m_Source.pitch       = Music.Pitch;
            m_Source.volume      = 0;
            m_Source.timeSamples = Request.Position;
            m_Source.Play();
            m_FadeVolume.Start(0, 1f, time);
        }