Example #1
0
    /// <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;
            }
        }
    }
Example #2
0
 public void ActionsInTheEnd()
 {
     RestartButton.EnableTheButton();
     ShowTheScore();
 }