Пример #1
0
    public Uzu.AudioHandle PlayBgm(string clipId, bool loop = true)
    {
        if (loop && clipId == _last_clipid) {
            return _activeBGMHandle;
        }
        _last_clipid = clipId;

        StopBgm();

        // Play sound.
        {
            Uzu.AudioController.PlayOptions options = new Uzu.AudioController.PlayOptions ();
            options.Loop = loop;
            options.Volume = BGM_VOLUME;
            options.FadeInTime = FADE_IN_TIME;
            _activeBGMHandle = _audioController.Play (clipId, options);
        }
        return _activeBGMHandle;
    }
Пример #2
0
    public Uzu.AudioHandle PlayBgm(string clipId, bool loop = true)
    {
        if (loop && clipId == _last_clipid)
        {
            return(_activeBGMHandle);
        }
        _last_clipid = clipId;

        StopBgm();

        // Play sound.
        {
            Uzu.AudioController.PlayOptions options = new Uzu.AudioController.PlayOptions();
            options.Loop       = loop;
            options.Volume     = BGM_VOLUME;
            options.FadeInTime = FADE_IN_TIME;
            _activeBGMHandle   = _audioController.Play(clipId, options);
        }
        return(_activeBGMHandle);
    }
Пример #3
0
 public void PlayEffect(string clipId)
 {
     Uzu.AudioController.PlayOptions options = new Uzu.AudioController.PlayOptions();
     options.Volume = SFX_VOLUME;
     _audioController.Play(clipId, options);
 }
Пример #4
0
 public void PlayEffect(string clipId)
 {
     Uzu.AudioController.PlayOptions options = new Uzu.AudioController.PlayOptions ();
     options.Volume = SFX_VOLUME;
     _audioController.Play (clipId, options);
 }