Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        gameObVida = GameObject.FindGameObjectWithTag("GameManager");
        vida       = gameObVida.GetComponent <vidaActual>();

        TigreAgent = GetComponent <NavMeshAgent>();
        Nisty      = GameObject.FindGameObjectWithTag("nisty");
    }
Exemplo n.º 2
0
    void Start()
    {
        obAgregar = GameObject.FindGameObjectWithTag("GameManager");
        agregar   = obAgregar.GetComponent <puntuacion>();

        ganaste = obAgregar.GetComponent <mostrarPantallaTxt>();

        //vida
        vida = obAgregar.GetComponent <vidaActual>();
    }
Exemplo n.º 3
0
    void Start()
    {
        gameObVida       = GameObject.FindGameObjectWithTag("GameManager");
        vida             = gameObVida.GetComponent <vidaActual>();
        objetoTexto.text = textoNuevo;
        contador         = 0;

        //sonido
        comerSound = comer.GetComponent <AudioSource>();
    }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     //Vector3 move = new Vector3;
     controlador = GetComponent <CharacterController>();
     yo          = GameObject.FindGameObjectWithTag("player");
     //Colisionar y quitar vida
     gameManagerObject = GameObject.FindGameObjectWithTag("GameManager");
     laifuActual       = gameManagerObject.GetComponent <vidaActual>();
     restarVida        = 1;
     //menusitos
     menuScript = gameManagerObject.GetComponent <menus>();
 }
Exemplo n.º 5
0
    void Start()
    {
        Nisty = GameObject.FindGameObjectWithTag("nisty");
        //vida
        gameObVida = GameObject.FindGameObjectWithTag("GameManager");
        vida       = gameObVida.GetComponent <vidaActual>();

        //puntuacion
        gameObPuntuacion = GameObject.FindGameObjectWithTag("GameManager");
        puntaje          = gameObPuntuacion.GetComponent <puntuacion>();

        // asdfg
        gameOver = gameObPuntuacion.GetComponent <mostrarPantallaTxt>();
    }
Exemplo n.º 6
0
    void Start()
    {
        controlador = GetComponent <CharacterController>();
        trampolin   = GameObject.FindGameObjectWithTag("trampolinY");
        velocidad.y = 0;

        //morido?
        gameObVida = GameObject.FindGameObjectWithTag("GameManager");
        vida       = gameObVida.GetComponent <vidaActual>();
        gameOver   = gameObVida.GetComponent <mostrarPantallaTxt>();

        //soio de nuevo
        Nisty = GameObject.FindGameObjectWithTag("nisty");

        //sonido
        saltoSound = saltar.GetComponent <AudioSource>();

        //pausar
        pausarJuego = gameObVida.GetComponent <menus>();

        estaSaltando = false;
    }
Exemplo n.º 7
0
    // Update is called once per frame
    void Update()
    {
        laifuActual = gameManagerObject.GetComponent <vidaActual>();
        rip         = laifuActual.muerto;
        //Debug.Log(this.gameObject);
        if (rip == false)
        {
            enemigoAgente.SetDestination(jugador.transform.position);
            if (Input.GetKeyDown(KeyCode.M))
            {
                if (estado == true)
                {
                    //localizar = punto;
                    estado = false;
                }
                else
                {
                    //localizar = jugador;
                    estado = true;
                }
            }

            if (estado == true)
            {
                enemigoAgente.SetDestination(punto.transform.position);
            }
            else
            {
                enemigoAgente.SetDestination(jugador.transform.position);
            }
        }
        //Debug.Log("Se murio");
        if (rip == true)
        {
            enemigoAgente.SetDestination(punto.transform.position);
        }
    }
Exemplo n.º 8
0
 //AudioSource zarpazo;
 void Start()
 {
     gameObVida = GameObject.FindGameObjectWithTag("GameManager");
     vida       = gameObVida.GetComponent <vidaActual>();
 }
Exemplo n.º 9
0
 //vidaActual vida;
 void Start()
 {
     obQuitar = GameObject.FindGameObjectWithTag("GameManager");
     quitar   = obQuitar.GetComponent <vidaActual>();
 }