private void OnTriggerEnter(Collider coll) { if (coll.gameObject.name == "Student") { doorOpen.Open(); } }
void Update() { if (button1 == true && button3 == true && button6 == true && button8 == true) { print("Door Should Open"); DoorOpen.Open(); //Disable buttons - anims and sounds // Change lighting? //Buttons perhaps flicker a light // Or/and the room lighting increases } }
void Update() { if (button1 == true && button2 == true && button3 == true && button4 == true && button5 == true && button6 == true) { DoorOpen.Open(); PointLight1.light.color = Color.blue; //Disable buttons - anims and sounds // Change lighting? //Buttons perhaps flicker a light // Or/and the room lighting increases } if (buzz == true) { GetComponent <AudioSource>().Play(); buzz = false; } }
// Update is called once per frame void Update() { if (isPressed) { if (this.transform.position.y > -0.28) { Vector3 temp = this.transform.position; temp.y -= DownSpeed * Time.deltaTime; this.transform.position = temp; } else { if (!isEnded) { isEnded = true; audio.clip = EndSound; audio.Play(); //camShake.Shake("z",-0.1f,1); Shockwave.GetComponent <ParticleSystem>().Play(); doorScrpit.Open(); } } } }