Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        EstadoJuego   = eEstadoJuego.Ejecutando;
        EstadoJugador = eEstadoJugador.Preparando;
        Dificultad    = eDificultad.Normal;

        enemigosEliminados = 0;
        puntos             = 0;
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        tiempoJuego   += Time.deltaTime;
        txtPuntos.text = puntos.ToString();

        txtKills.text = enemigosEliminados.ToString();

        //Si el jugador sobrevivio mas de un minuto se aumenta la dificultad
        if (tiempoJuego > 15)
        {
            Dificultad = eDificultad.Dificil;
        }


        //FIN DE JUEGO
        if (EstadoJuego == eEstadoJuego.Terminado)
        {
            Time.timeScale = 0;
        }
    }