Esempio n. 1
0
    void Awake()
    {
        /*se obtiene las coordenadas de las esquinas para definir el espacio en el que pueden aparecer los obstaculos*/
        Vector3 aux;

        valoresFrontera         = new float[4];
        aux                     = GameObject.Find("NE").transform.position;
        valoresFrontera [X_MAX] = aux.x;
        valoresFrontera [Y_MAX] = aux.y;

        aux = GameObject.Find("SW").transform.position;
        valoresFrontera [X_MIN] = aux.x;
        valoresFrontera [Y_MAX] = aux.y;

        //cargando obstaculos
        cargaObstaculos();

        //generando piscina de obstaculos
        generaPiscinaObstaculos();
        tiempoRestanteAparicionNormal  = TIEMPO_MAXIMO_ENTRE_OBSTACULOS;
        tiempoRestanteAparicionTipo2   = TIEMPO_MAXIMO_ENTRE_OBSTACULOS * 1.5f;
        tiempoRestanteAparicionTipo3   = TIEMPO_MAXIMO_ENTRE_OBSTACULOS * 2;
        tiempoRestanteAparicionPuertas = TIEMPO_ENTRE_PUERTAS;

        //inicilizando variables
        obstaculosActivos    = new List <Obstaculo>();
        obstaculosParaBorrar = new List <Obstaculo>();
        cm            = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CombinacionManager>();
        tiempoInicial = Time.time;
    }
Esempio n. 2
0
 void Awake()
 {
     continuar           = GameObject.Find("Continuar");
     puntuacion          = GameObject.Find("Puntuacion");
     empezar             = GameObject.Find("Empezar");
     logo                = GameObject.Find("LogoMenu");
     salir               = GameObject.Find("Salir");
     calibrando          = GameObject.Find("Calibrando");
     estadoAnterior      = -1;     //para que se ejecute el switch la primera vez
     bootonesPulsados    = new bool[4];
     generadorObstaculos = GameObject.Find("Generatron").GetComponent <GeneradorObstaculos>();
     puntuacionFinJuego  = GameObject.Find("PuntuacionFinJuego");
     cm = GameObject.Find("Main Camera").GetComponent <CombinacionManager>();
     //bandeja = GameObject.Find("Bandeja").GetComponent<Prueba>();
 }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     text.color = (CombinacionManager.GetPinesActivos()[pin]) ? Color.red : Color.black;
 }