コード例 #1
0
        void OnAudio(IAudioEvent2D e)
        {
            for (int i = head; i != tail; i = (i+1) % MaxPending) {
                if (pending [i].audio.name.Equals (e.audio.name)) {
                    return;
                }
            }

            pending [tail] = e;
            tail = (tail + 1) % MaxPending;
        }
コード例 #2
0
ファイル: AudioQueue2D.cs プロジェクト: yazici/audio_queue
        void OnAudio(IAudioEvent2D e)
        {
            for (int i = head; i != tail; i = (i + 1) % MaxPending)
            {
                if (pending [i].audio.name.Equals(e.audio.name))
                {
                    return;
                }
            }

            pending [tail] = e;
            tail           = (tail + 1) % MaxPending;
        }
コード例 #3
0
    void OnAudio(IAudioEvent2D e)
    {
        // Do not add duplicate events. Prevents situation where the same
        // audio clips are played in parallel increasing the effects volume.
        for (int i = head; i != tail; i = (i + 1) % MaxPending)
        {
            if (pending[i].Audio.name.Equals(e.Audio.name))
            {
                return;
            }
        }

        pending[tail] = e;
        tail = (tail + 1) % MaxPending;
    }
コード例 #4
0
    void OnAudio(IAudioEvent2D e)
    {
        // Do not add duplicate events. Prevents situation where the same
        // audio clips are played in parallel increasing the effects volume.
        for (int i = head; i != tail; i = (i + 1) % MaxPending)
        {
            if (pending[i].Audio.name.Equals(e.Audio.name))
            {
                return;
            }
        }

        pending[tail] = e;
        tail          = (tail + 1) % MaxPending;
    }