void LooseGame() { removeNextElements(); GameObject.FindGameObjectWithTag("Elements").GetComponentInChildren <TextureShowHide>().cascadeDisapearing(); score.saveIfBestScore(); GameObject.FindGameObjectWithTag("Score").GetComponent <Text>().text = Score.getBestScore().ToString(); GameObject.FindGameObjectWithTag("MenuController").GetComponent <Menu>().setActiveCanvas("MainCanvas"); Destroy(gameObject); }
void Start() { GameObject.FindGameObjectWithTag("Score").GetComponent <Text>().text = Score.getBestScore().ToString(); }