Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (score.score == MetaScore)
        {
            NormalHud.SetActive(false);
            VictoryHud.SetActive(true);
            Playables.SetActive(false);
            Botellas = GameObject.FindGameObjectsWithTag("Bullet");

            foreach (GameObject botella in Botellas)
            {
                botella.SetActive(false);
            }
        }

        if (timeActual < timeInicial / 2)
        {
            spawnerIzq.SetActive(true);
        }

        if (timeActual < timeInicial / 3)
        {
            spawnerDer.SetActive(true);
        }

        if (timeActual < 0f)
        {
            if (score.score <= MetaScore)
            {
                NormalHud.SetActive(false);
                LoseHud.SetActive(true);
                Playables.SetActive(false);
                Botellas = GameObject.FindGameObjectsWithTag("Bullet");

                foreach (GameObject botella in Botellas)
                {
                    botella.SetActive(false);
                }
            }
        }

        if (fallasBotellas.contadorFallas == fallasBotellas.NumeroFallas)
        {
            NormalHud.SetActive(false);
            LoseHud.SetActive(true);
            Playables.SetActive(false);
            Botellas = GameObject.FindGameObjectsWithTag("Bullet");

            foreach (GameObject botella in Botellas)
            {
                botella.SetActive(false);
            }
        }

        text.text = "Tiempo = " + timeActual.ToString("F0");

        timeActual -= Time.deltaTime;
    }
Пример #2
0
 public void IniciarTutorial()
 {
     TutorialHud.SetActive(true);
     NormalHud.SetActive(false);
 }