// Update is called once per frame void OnCollisionEnter(Collision other) { if (other.transform.tag == "Key") { if (objectToShow != null) { objectToShow.renderer.enabled = true; } fader.FadeToBlack(); if (Application.levelCount > 1) { Application.LoadLevel(1); } else { Application.LoadLevel(0); } } }