// Use this for initialization void Start() { Puntuacion = GameObject.Find("C_Puntuacion").GetComponent <Ctrl_Puntuacion>(); jugador = GameObject.FindGameObjectWithTag("Jugador").transform; //Destino = GameObject.Find("destino").GetComponent<Transform>().position;//new Vector3(0, jugador.position.y, this.transform.position.z); nav = GetComponent <NavMeshAgent>(); colBomb = GetComponent <CapsuleCollider>(); energia = GameObject.Find("Elementos_Escenario").GetComponent <Enegia>(); Vidas = GameObject.FindGameObjectWithTag("Jugador").GetComponent <movimiento_personaje>(); //Velocidad = nav.speed; animatorEnemigo = gameObject.transform.GetChild(0).GetComponent <Animator>(); if (GameObject.Find("creador_objetos")) { Oleadas = GameObject.Find("creador_objetos").GetComponent <Ctrl_oleadas>(); VidaEnemigo += (Oleadas.ContadorOleadas * 10); } Habilidades = GameObject.Find("CTRL_Habilidades").GetComponent <Ctrl_Habilidades>(); if (gameObject.name == "E_Bomb(Clone)") { //print(gameObject.name); animatorEnemigo = gameObject.transform.GetChild(0).GetComponent <Animator>(); animatorEnemigo.SetBool("enElAire", true); } //Variables Sonidos SonidoRecibirPajaritazoEnemigo = GameObject.Find("SonidoRecibirPajaritazoEnemigo").GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { datosGuardados = GameObject.Find("Datosguardados").GetComponent <DatosGuardados>(); Jugador = GameObject.FindGameObjectWithTag("Jugador").GetComponent <movimiento_personaje>(); Habilidades = GameObject.Find("CTRL_Habilidades").GetComponent <Ctrl_Habilidades>(); Oleadas = GameObject.Find("creador_objetos").GetComponent <Ctrl_oleadas>(); ActualizarPremios(); }
// Use this for initialization void Start() { DatosGuardar = GameObject.Find("Datosguardados").GetComponent <DatosGuardados>(); tiempo = GameObject.Find("Timer").GetComponent <Timer>(); if (GameObject.Find("creador_objetos")) { Oleadas = GameObject.Find("creador_objetos").GetComponent <Ctrl_oleadas>(); } Botones = GameObject.Find("Canvas").GetComponent <Ctrl_Botones>(); //Actualizar_enemigos(); Invoke("ApagarTextos", 1f); }