Assets.Environment.Doors.BigDoubleDoor.Scripts.DoubleDoorOpen.CheckForInputs C# (CSharp) Method

CheckForInputs() private method

private CheckForInputs ( ) : IEnumerator
return IEnumerator
        IEnumerator CheckForInputs()
        {
            while (true)
            {
                if (_interactables.All(i => i.HasBeenActivated()))
                {
                    if(!ObjectIsShown){
                        GetComponent<AudioSource>().Play();
                        Camera.main.GetComponent<PerlinShake>().PlayShake();
                    }
                    ObjectIsShown = true;
                }
                else
                {
                    ObjectIsShown = false;
                }
                yield return new WaitForSeconds(0.2f);
            }
        }