Beispiel #1
0
    //-------------------------------------------------------------------------
    public void play(string file_name, _eSoundLayer sound_layer)
    {
        AudioSource audio_src = _genAudioSource();

        audio_src.clip = _loadAudioClip("Audio/" + file_name);
        mMapSoundLayer[sound_layer].play(audio_src);
    }
 public void Play(_eSoundLayer layer, string sound_name)
 {
     if (string.IsNullOrEmpty(sound_name))
     {
         return;
     }
     mSoundLayers[layer].Play(sound_name);
 }
Beispiel #3
0
        //---------------------------------------------------------------------
        public void play(string file_name, _eSoundLayer sound_layer)
        {
            if (string.IsNullOrEmpty(file_name))
            {
                return;
            }
            var audio_clip = _loadAudioClip(file_name);

            if (audio_clip != null)
            {
                AudioSource audio_src = _genAudioSource();
                audio_src.clip = audio_clip;
                mMapSoundLayer[sound_layer].play(audio_src);
            }
        }
 public void Stop(_eSoundLayer layer)
 {
     mSoundLayers[layer].Stop();
 }
 public void SetVolume(_eSoundLayer layer, float volume)
 {
     mSoundLayers[layer].SetVolume(volume);
 }
Beispiel #6
0
 //---------------------------------------------------------------------
 public void Play(string file_name, _eSoundLayer sound_layer)
 {
     SoundMgr.play(file_name, sound_layer);
 }
Beispiel #7
0
 //-------------------------------------------------------------------------
 public void play(string file_name, _eSoundLayer sound_layer)
 {
     AudioSource audio_src = _genAudioSource();
     audio_src.clip = _loadAudioClip("Audio/" + file_name);
     mMapSoundLayer[sound_layer].play(audio_src);
 }