/// <summary> /// Destroys a life. /// </summary> public void DestroyTheLife() { if (Controller.GameActive) { StartCoroutine(UpdateTheHealthUi(Controller.Lifes)); Controller.Lifes--; if (Controller.Lifes <= 0) { GameObject.Find("Canvas/EndUi").GetComponent <Animator>().Play("EndUi"); RestartButton.EnableTheButton(); SetBest(); Controller.GameActive = false; } } }
public void ActionsInTheEnd() { RestartButton.EnableTheButton(); ShowTheScore(); }