private void Update() { if (ThePlayer.IsAlive() && !Level.AtCaveEnd()) { AddDistanceFromTime(Time.deltaTime); } if (PlayerController.State == GameStates.Normal && Level.AtCaveEnd()) { ThePlayer.CaveEndReached(); } }