void OnTriggerEnter(Collider other) { if ((other.collider.name == "OVRPlayerController")) { if (paperPickUp.pickedUp) { doorLock.SetActive(false); Debug.Log("THE DOOR SHOULD BE UNLOCKED NOW"); } else { print("The door is locked"); } audioManager.Play(1); doorHit = true; print("open door"); door.animation ["Take 001"].speed = 1; door.animation.Play("Take 001"); fogOn = true; //yield return new WaitForSeconds(5); /*print ("close door"); * door.animation ["Take 001"].speed = -1; * door.animation.Play ("Take 001"); * doorSlammed = true;*/ } }
// make the little girl appear public void Appear(bool stairs) { if (stairs) //this is called when the girl appears on the stairs { audioManager.Play(9); //play ring around the rosie } girl.SetActive(true); girl.animation.Play("Take 0012"); }
void OnTriggerEnter(Collider other) { if (gameObject.name == "DoorDoubleOpen" && other.collider.name == "OVRPlayerController") { audioManager.Play(2); //open double doors door.animation.Play("Take 0010"); print("doubledoor should open"); } if (gameObject.name == "DoorDoubleShake" && other.collider.name == "OVRPlayerController") { audioManager.Play(4); //play scratch door.animation.Play("Take 001"); print("doubledoor should shake"); } }
void OnTriggerEnter(Collider info) { if (gameObject.name == "Wall_Plain_Blood" && info.collider.name == "OVRPlayerController") { print("textures should change"); audioManager.Play(10); //blood splat blood = true; } }
void OnTriggerEnter(Collider other) { if (other.collider.name == "OVRPlayerController") { audioManager.Play(1); print("open door"); door.animation ["Take 001"].speed = 1; door.animation.Play("Take 001"); //yield return new WaitForSeconds(5); } }
IEnumerator OnTriggerEnter(Collider other) { if ((other.collider.name == "OVRPlayerController") & doorUnlocked) { audioManager.Play(1); doorHit = true; doorLock.SetActive(false); print("open door"); door.animation ["Take 001"].speed = 1; door.animation.Play("Take 001"); fogOn = true; yield return(new WaitForSeconds(5)); /*print ("close door"); * door.animation ["Take 001"].speed = -1; * door.animation.Play ("Take 001"); * doorSlammed = true;*/ } else if (other.collider.name == "OVRPlayerController") { doorLocked = false; } }
void OnTriggerEnter(Collider info) { if (gameObject.name == "Radiator2Floor" && info.collider.name == "OVRPlayerController") { print("stairs shut down"); wallToMove.active = true; audioManager.Play(23); } if (gameObject.name == "HangingLight_MoveWall" && info.collider.name == "OVRPlayerController") { print("wall starts moving"); triggered = true; wallIsMoving = true; } }
// Update is called once per frame void Update() { if (!placed) { placeTapes(); } if (cameraCollide.jiggle) { //audioManager.Play (28); //there is no audio 28! } if (cameraCollide.inTheHall == false) { audioManager.SetVolume(11, .5f); } audioManager.PlayLoop(11); audioManager.PlayLoop(8); // knocking(); if (cameraCollide.inTheHall == true) { audioManager.FadeOut(11); audioManager.FadeOut(8); audioManager.FadeIn(7); // audioManager.FadeIn (8); if (!banged && opener.doorSlammed) { audioManager.Play(18); banged = true; } } else { audioManager.SetVolume(7, 0.0f); audioManager.SetVolume(8, 0.0f); audioManager.Play(7); audioManager.Play(8); } if (tapePlayerPickup.pickedUp == true && tapePickup.pickedUp == true) { firstdoor.doorUnlocked = true; handAppear(firstTapeTimer, 24); firstTapeTimer -= Time.deltaTime; } if (tapePickUp2.pickedUp == true) { handAppear(secondTapeTimer, 25); secondTapeTimer -= Time.deltaTime; } if (tapePickUp3.pickedUp == true) { handAppear(thirdTapeTimer, 26); thirdTapeTimer -= Time.deltaTime; } if (tapePickUp4.pickedUp == true) { handAppear(fourthTapeTimer, 31); fourthTapeTimer -= Time.deltaTime; } if (opener.doorLocked == true) { audioManager.Play(32); opener.doorLocked = true; } }