public void Update() { if (leftElytra.instrumentPlaying && rightElytra.instrumentPlaying && !activated) { activated = true; leftElytra.LockElytra(); rightElytra.LockElytra(); door.Activate(); } }
private void OnCollisionEnter(Collision collision) { if (this.active && collision.gameObject.tag == "Player") { if (closet) { closet.Toggle(); } if (door) { door.Activate(); } if (shedDoor) { shedDoor.Activate(); } Destroy(gameObject); } }