public void doorBed2Button() { if (keyBed2Picked) { ghostRayCol.SetActive(true); roomGhost.SetActive(true); openBed2Door = true; bed2DoorCol.SetActive(false); keyIcon.SetActive(false); Door3.GetComponent<AudioSource>().PlayOneShot(openingDoor, 1); } else { StopCoroutine("bed1Closed"); StartCoroutine("bed1Closed"); } }
void Scene3() { if (back1) { FinalEmpty[1] = DI_Done2[Random.Range(0, DI_Done2.Length)]; FinalEmpty[0] = DI_Done1[Random.Range(1, DI_Done1.Length)]; Guard1_con.SetSeq(FinalEmpty, true); } else { Guard1_con.PlaySound(DI_Done1[0], true); } Door3.GetComponent <Object_Door>().DoorSwitch(); Guard1_con.SetLookAt(playerHead); Guard2_con.StopLookAt(); Guard2_con.PausePath(); Check2 = false; NextScene.SetActive(true); }