Beispiel #1
0
        private void Update()
        {
            switch (_state)
            {
            case State.Uninitialized:
                break;

            case State.Unused:
                break;

            case State.Playing:
                if (!audioSource.isPlaying)
                {
                    _state = State.Unused;
                    _pooler.ReturnInstantAudio(this);
                }
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }