// 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"); }
void Start() { obAgregar = GameObject.FindGameObjectWithTag("GameManager"); agregar = obAgregar.GetComponent <puntuacion>(); ganaste = obAgregar.GetComponent <mostrarPantallaTxt>(); //vida vida = obAgregar.GetComponent <vidaActual>(); }
void Start() { gameObVida = GameObject.FindGameObjectWithTag("GameManager"); vida = gameObVida.GetComponent <vidaActual>(); objetoTexto.text = textoNuevo; contador = 0; //sonido comerSound = comer.GetComponent <AudioSource>(); }
// 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>(); }
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>(); }
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; }
// 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); } }
//AudioSource zarpazo; void Start() { gameObVida = GameObject.FindGameObjectWithTag("GameManager"); vida = gameObVida.GetComponent <vidaActual>(); }
//vidaActual vida; void Start() { obQuitar = GameObject.FindGameObjectWithTag("GameManager"); quitar = obQuitar.GetComponent <vidaActual>(); }