コード例 #1
0
    public void LessLifes()
    {
        sound.SoundPlay(4);

        if (Lifes_Controller.lifes <= 0)
        {
            return;
        }

        Lifes_Controller.lifes--;

        if (Lifes_Controller.lifes <= 0)
        {
            gameover.SetActive(true);
            ball.StopMove();
            bar.enabled = false;

            sound.SoundPlay(2);

            music.Stop();

            sceneController.Loadlevel();
        }

        bar.Reset();
        ball.Reset();
        ResetUILifes();
    }
コード例 #2
0
    public void GanarPuntos()
    {
        Points_Controller.points++;
        PointsUpdate();

        if (bloques.childCount <= 0)
        {
            pelota.StopMove();
            bar.enabled = false;

            if (SceneController.LastLevel())
            {
                juegoCompletado.SetActive(true);
                music.Stop();
                sound.SoundPlay(3);
            }
            else
            {
                nivelCompletado.SetActive(true);
            }

            SceneController.Loadlevel();
        }
    }