void Start() { if (Constantes.tipoDePregunta == (int)Constantes.TipoDePregunta.CompletaLaFrase) { txt = (TextAsset)Resources.Load("termina_la_frase", typeof(TextAsset)); } else if (Constantes.tipoDePregunta == (int)Constantes.TipoDePregunta.Jeroglifico) { txt = (TextAsset)Resources.Load("jeroglificos", typeof(TextAsset)); } else { txt = (TextAsset)Resources.Load("que_nos_une", typeof(TextAsset)); } aux = (TextAsset)Resources.Load("jeroglificos", typeof(TextAsset)); leerTxts(); leerTxtAuxiliar(); ponerPrecios(); fichasColocadas = GameObject.Find("FichasColocadas"); fichaDrop = (GameObject)Resources.Load("FichaDrop", typeof(GameObject)); zonaFichas = GameObject.Find("ZonaFichas"); controladorEstado = GameObject.Find("ControladorEstados").GetComponent <ControladorEstados>(); zonaDropInicial = GameObject.Find("DropZone"); dropHereTableroJuego = GameObject.Find("TableroJuego").GetComponent <DropHere>(); tiempoActual = tiempoInicial; textoTiempo.text = "" + tiempoActual; textoAciertos.text = "" + aciertos; PlayerPrefs.SetInt("Coins", 2000); MostrarMonedas(); //InstanciarZonaDrops(); //Instanciamos zona de drops. }
void FindObjects() { powerupFirstChip = GameObject.Find("PonerPrimera"); chipsSet = GameObject.Find("FichasColocadas"); print(chipsSet); chipZone = GameObject.Find("ZonaFichas"); controladorEstado = GameObject.Find("ControladorEstados").GetComponent <ControladorEstados>(); initialDropZone = GameObject.Find("DropZone"); dropHereTableroJuego = GameObject.Find("TableroJuego").GetComponent <DropHere>(); correctText = GameObject.Find("textoAciertos").GetComponent <Text>(); coinsText = GameObject.Find("TextoMonedas").GetComponent <Text>(); nextQuestionPriceText = GameObject.Find("PrecioPasarPregunta").GetComponent <Text>(); setFirstPriceText = GameObject.Find("PrecioPonerPrimera").GetComponent <Text>(); deleteChipPriceText = GameObject.Find("PrecioEliminarFicha").GetComponent <Text>(); }