IEnumerator CheckForInputs()
{
while (true)
{
if (_interactables.All(i => i.HasBeenActivated()))
{
if(!_objectIsShown){
if(GetComponent<AudioSource>() != null)
{
GetComponent<AudioSource>().Play();
Camera.main.GetComponent<PerlinShake>().PlayShake();
}
}
_objectIsShown = true;
obstacle.SetActive(false);
//GameObject.FindGameObjectWithTag(Constants.Tags.GameMaster).GetComponent<RoomManager>().SetCurrentRoom(1);
}
else if(!sidekickOnStairs && !playerOnStairs)
{
_objectIsShown = false;
obstacle.SetActive(true);
}
yield return new WaitForSeconds(0.2f);
}
}