// Update is called once per frame void Update() { timeElapsed += Time.deltaTime; timeRemaining -= Time.deltaTime; PersistentManagerScript.Globals.sliders.transform.Find("Crystal Slide").GetComponent <Slider>().value = timeRemaining / timeToCompleteLevel; if (timeRemaining < 0 && !dead) { StageFail.Failure(); dead = true; } }
void OnCollisionEnter(Collision col) { StageFail.Failure(); }