// Update is called once per frame void Update() { if (Ground.transform.position.y > this.transform.position.y) { SizeChange.ResetAll(); FindObjectOfType <GameManager>().EndGame(); } }
void OnTriggerEnter(Collider other) { SizeChange.ResetAll(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }
// Use this for initialization void OnTriggerEnter(Collider other) { SizeChange.ResetAll(); FindObjectOfType <GameManager> ().EndGame(); Destroy(other.gameObject); }